mediacube-ui-v2 0.0.324 → 0.0.325
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/ai-catalog/index.json +29 -9
- package/dist/ai-catalog/types/IDSOptions.ts +2 -0
- package/dist/ai-catalog/types/ISelect.ts +5 -0
- package/dist/ai-catalog/types/ITranslations.ts +69 -0
- package/dist/components/elements/McDatepicker/McDatepicker.vue2.js +176 -178
- package/dist/components/elements/McFieldSelect/McFieldSelect.vue2.js +125 -113
- package/dist/components/patterns/McFilter/McFilter.vue2.js +89 -88
- package/dist/index.js +21 -18
- package/dist/{mocks/filterMocks.js → types/ITranslations.js} +18 -4
- package/dist/types/components/elements/McFieldRadio/McFieldRadio.vue.d.ts +2 -2
- package/dist/types/components/elements/McFieldRadio/index.d.ts +6 -6
- package/dist/types/components/elements/McFieldSelect/McFieldSelect.vue.d.ts +19 -3
- package/dist/types/components/elements/McFieldSelect/index.d.ts +22 -6
- package/dist/types/components/elements/McNodata/McNoData.vue.d.ts +2 -2
- package/dist/types/components/elements/McNodata/index.d.ts +6 -6
- package/dist/types/components/patterns/McFilter/McFilter.vue.d.ts +2 -2
- package/dist/types/components/patterns/McFilter/index.d.ts +5 -5
- package/dist/types/components/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.d.ts +1 -1
- package/dist/types/components/patterns/McSideBar/McSideBarButton/index.d.ts +1 -1
- package/dist/types/components/patterns/McTab/McTab.vue.d.ts +1 -1
- package/dist/types/components/patterns/McTab/index.d.ts +3 -3
- package/dist/types/components/templates/McToast/McToast.vue.d.ts +2 -2
- package/dist/types/components/templates/McToast/index.d.ts +2 -2
- package/dist/types/types/IDSOptions.d.ts +2 -0
- package/dist/types/types/ISelect.d.ts +4 -0
- package/dist/types/types/ITranslations.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"catalogSchemaVersion": 2,
|
|
3
|
-
"libraryVersion": "0.0.
|
|
3
|
+
"libraryVersion": "0.0.325",
|
|
4
4
|
"packageName": "mediacube-ui-v2",
|
|
5
5
|
"pathHash": "9b6f3b8016b22ac7",
|
|
6
6
|
"componentCount": 76,
|
|
@@ -235,6 +235,11 @@
|
|
|
235
235
|
"file": "types/ITooltip.ts",
|
|
236
236
|
"packageExport": "mediacube-ui-v2/types/ITooltip"
|
|
237
237
|
},
|
|
238
|
+
{
|
|
239
|
+
"id": "types/ITranslations",
|
|
240
|
+
"file": "types/ITranslations.ts",
|
|
241
|
+
"packageExport": "mediacube-ui-v2/types/ITranslations"
|
|
242
|
+
},
|
|
238
243
|
{
|
|
239
244
|
"id": "types/styles/Alignment",
|
|
240
245
|
"file": "types/styles/Alignment.ts",
|
|
@@ -296,7 +301,7 @@
|
|
|
296
301
|
"packageExport": "mediacube-ui-v2/types/styles/Weights"
|
|
297
302
|
}
|
|
298
303
|
],
|
|
299
|
-
"typesFileCount":
|
|
304
|
+
"typesFileCount": 59,
|
|
300
305
|
"components": [
|
|
301
306
|
{
|
|
302
307
|
"id": "elements/McAvatar/McAvatar",
|
|
@@ -1111,9 +1116,9 @@
|
|
|
1111
1116
|
},
|
|
1112
1117
|
{
|
|
1113
1118
|
"name": "placeholders",
|
|
1114
|
-
"type": "
|
|
1119
|
+
"type": "Partial<IDatepickerPlaceholders>",
|
|
1115
1120
|
"required": false,
|
|
1116
|
-
"defaultValue": "() => ({
|
|
1121
|
+
"defaultValue": "() => ({})",
|
|
1117
1122
|
"description": "Формат отдаваемой даты"
|
|
1118
1123
|
},
|
|
1119
1124
|
{
|
|
@@ -1322,10 +1327,11 @@
|
|
|
1322
1327
|
"storyParseError": null
|
|
1323
1328
|
},
|
|
1324
1329
|
"relatedTypeImports": [
|
|
1330
|
+
"@/types/IDSOptions",
|
|
1325
1331
|
"@/types/IDatepicker",
|
|
1326
1332
|
"@/types/styles/Colors"
|
|
1327
1333
|
],
|
|
1328
|
-
"searchText": "elements/mcdatepicker/mcdatepicker mcdatepicker mediacube-ui-v2/components/elements/mcdatepicker/mcdatepicker modelvalue type title helptext editable disabled placeholder name lang errors toisoformat placeholders custompresets range inline mindate maxdate disableddates alloweddates disabledtime minwidth hours minutes seconds timezone usetimezone clearable loading setdefaulttoday markers hidecalendaricon teleport teleportto update:modelvalue @/types/idatepicker @/types/styles/colors",
|
|
1334
|
+
"searchText": "elements/mcdatepicker/mcdatepicker mcdatepicker mediacube-ui-v2/components/elements/mcdatepicker/mcdatepicker modelvalue type title helptext editable disabled placeholder name lang errors toisoformat placeholders custompresets range inline mindate maxdate disableddates alloweddates disabledtime minwidth hours minutes seconds timezone usetimezone clearable loading setdefaulttoday markers hidecalendaricon teleport teleportto update:modelvalue @/types/idsoptions @/types/idatepicker @/types/styles/colors",
|
|
1329
1335
|
"aiDoc": "",
|
|
1330
1336
|
"docgenError": null
|
|
1331
1337
|
},
|
|
@@ -2206,9 +2212,16 @@
|
|
|
2206
2212
|
"name": "noResultsText",
|
|
2207
2213
|
"type": "string",
|
|
2208
2214
|
"required": false,
|
|
2209
|
-
"defaultValue": "
|
|
2215
|
+
"defaultValue": "null",
|
|
2210
2216
|
"description": "Текст для пустого селекта, когда неичего не найдено"
|
|
2211
2217
|
},
|
|
2218
|
+
{
|
|
2219
|
+
"name": "emptyList",
|
|
2220
|
+
"type": "string",
|
|
2221
|
+
"required": false,
|
|
2222
|
+
"defaultValue": "null",
|
|
2223
|
+
"description": "Текст для пустого списка опций"
|
|
2224
|
+
},
|
|
2212
2225
|
{
|
|
2213
2226
|
"name": "loading",
|
|
2214
2227
|
"type": "boolean",
|
|
@@ -2281,6 +2294,10 @@
|
|
|
2281
2294
|
"name": "noResult",
|
|
2282
2295
|
"description": "Слот для текста, если ничего не найдено"
|
|
2283
2296
|
},
|
|
2297
|
+
{
|
|
2298
|
+
"name": "noOptions",
|
|
2299
|
+
"description": "Слот для текста, если список опций пуст"
|
|
2300
|
+
},
|
|
2284
2301
|
{
|
|
2285
2302
|
"name": "footer",
|
|
2286
2303
|
"description": "Слот доп. текста под инпутом"
|
|
@@ -2299,7 +2316,7 @@
|
|
|
2299
2316
|
],
|
|
2300
2317
|
"storyHints": {
|
|
2301
2318
|
"metaArgs": {
|
|
2302
|
-
"_unparsedSnippet": "{\n title: 'McPay benefits',\n searchable: true,\n multiple: false,\n hideSelected: true,\n allowEmpty: true,\n disabled: false,\n taggable: false,\n internalSearch: true,\n loading: false,\n optionsTooltip: false,\n showLabels: false,\n renderAbsoluteList: false,\n required: false,\n groupSelect: false,\n optionWithPreview: false,\n dir: Directions.Ltr,\n avatar: '',\n locale: 'en',\n tabindex: 0,\n noResultsText: 'No results for now',\n maxHeight: '',\n }"
|
|
2319
|
+
"_unparsedSnippet": "{\n title: 'McPay benefits',\n searchable: true,\n multiple: false,\n hideSelected: true,\n allowEmpty: true,\n disabled: false,\n taggable: false,\n internalSearch: true,\n loading: false,\n optionsTooltip: false,\n showLabels: false,\n renderAbsoluteList: false,\n required: false,\n groupSelect: false,\n optionWithPreview: false,\n dir: Directions.Ltr,\n avatar: '',\n locale: 'en',\n tabindex: 0,\n noResultsText: 'No results for now',\n emptyList: 'List is empty',\n maxHeight: '',\n }"
|
|
2303
2320
|
},
|
|
2304
2321
|
"stories": {
|
|
2305
2322
|
"Default": {
|
|
@@ -2310,12 +2327,13 @@
|
|
|
2310
2327
|
},
|
|
2311
2328
|
"relatedTypeImports": [
|
|
2312
2329
|
"@/types/IChip",
|
|
2330
|
+
"@/types/IDSOptions",
|
|
2313
2331
|
"@/types/IDirections",
|
|
2314
2332
|
"@/types/ISelect",
|
|
2315
2333
|
"@/types/styles/Colors",
|
|
2316
2334
|
"@/types/styles/Icons"
|
|
2317
2335
|
],
|
|
2318
|
-
"searchText": "elements/mcfieldselect/mcfieldselect mcfieldselect mediacube-ui-v2/components/elements/mcfieldselect/mcfieldselect modelvalue title helptext options searchable multiple hideselected allowempty disabled avatar icon backgroundcolor placeholder opendirection taggable showlabels internalsearch errors name optionstooltip groupselect required optionwithpreview tabindex maxheight renderabsolutelist locale noresultstext loading dir titlefield valuefield original-input tag search-change update:modelvalue handle-open handle-close @/types/ichip @/types/idirections @/types/iselect @/types/styles/colors @/types/styles/icons",
|
|
2336
|
+
"searchText": "elements/mcfieldselect/mcfieldselect mcfieldselect mediacube-ui-v2/components/elements/mcfieldselect/mcfieldselect modelvalue title helptext options searchable multiple hideselected allowempty disabled avatar icon backgroundcolor placeholder opendirection taggable showlabels internalsearch errors name optionstooltip groupselect required optionwithpreview tabindex maxheight renderabsolutelist locale noresultstext emptylist loading dir titlefield valuefield original-input tag search-change update:modelvalue handle-open handle-close @/types/ichip @/types/idsoptions @/types/idirections @/types/iselect @/types/styles/colors @/types/styles/icons",
|
|
2319
2337
|
"aiDoc": "",
|
|
2320
2338
|
"docgenError": null
|
|
2321
2339
|
},
|
|
@@ -4582,11 +4600,13 @@
|
|
|
4582
4600
|
},
|
|
4583
4601
|
"relatedTypeImports": [
|
|
4584
4602
|
"@/types/IButton",
|
|
4603
|
+
"@/types/IDSOptions",
|
|
4585
4604
|
"@/types/IFilter",
|
|
4586
4605
|
"@/types/ISelect",
|
|
4606
|
+
"@/types/ITranslations",
|
|
4587
4607
|
"@/types/styles/Colors"
|
|
4588
4608
|
],
|
|
4589
|
-
"searchText": "patterns/mcfilter/mcfilter mcfilter mediacube-ui-v2/components/patterns/mcfilter/mcfilter open name modelvalue filters buttonconfirmisloading disabledopen usetimezone placeholders withactivator withpresets selectedpreset error clear open delete-preset update:modelvalue confirm @/types/ibutton @/types/ifilter @/types/iselect @/types/styles/colors",
|
|
4609
|
+
"searchText": "patterns/mcfilter/mcfilter mcfilter mediacube-ui-v2/components/patterns/mcfilter/mcfilter open name modelvalue filters buttonconfirmisloading disabledopen usetimezone placeholders withactivator withpresets selectedpreset error clear open delete-preset update:modelvalue confirm @/types/ibutton @/types/idsoptions @/types/ifilter @/types/iselect @/types/itranslations @/types/styles/colors",
|
|
4590
4610
|
"aiDoc": "# McFilter — данные и события для ИИ\n\n## Назначение\n\nПанель фильтрации: выбор полей из `filters`, условия (relation / text / range / date / fast), теги, пресеты, подтверждение.\n\n## Модель (`v-model` / `modelValue`)\n\nТип `IFilterValue` (см. `mediacube-ui-v2/types/IFilter`):\n\n- **`filter`**: объект условий; ключ — `IFilter.value` из схемы `filters`, значение — условие (`FilterConditionValue`: скаляр, `{ more, less }`, или relation-объект с `is` / `is_not` / `exists`).\n- **`filter_name`**: строка (в API часто base64/URI-кодированный JSON) с человекочитаемыми подписями для тегов; после decode — `IFilterParsedValueFilterName` (параллельная структура ключам `filter`).\n\nПри инициализации и обновлении `modelValue` библиотека нормализует состояние (`normalizeMcFilterModel`): отбрасывает ключи не из `props.filters`, восстанавливает `filter_name` из `filter` при пустых подписях.\n\n## Props (важное)\n\n- **`name`** (string): идентификатор фильтра (пресеты в localStorage).\n- **`filters`** (`IFilter[]`): схема полей; обязательна как источник правды по ключам.\n- **`modelValue`**: `{ filter, filter_name }`.\n- **`placeholders`**, **`open`**, **`withPresets`**, **`withActivator`**, **`useTimezone`**, и т.д. — см. автогенерируемые props в ai-catalog.\n\n## События\n\n- **`update:modelValue`**, **`confirm`**: актуальное значение после «Применить».\n- **`error`**, **`clear`**, **`open`**, **`delete-preset`**.\n\n## Практика\n\n- Всегда передавайте **`filters`** с тем же набором `value`, что и ключи в сохранённом `filter`.\n- Для relation с опциями используйте `options` или ajax-функции; доменные типы — `IRelationFilter`, `IFilter` в types.",
|
|
4591
4611
|
"docgenError": null
|
|
4592
4612
|
},
|
|
@@ -2,6 +2,7 @@ import { VueElement } from 'vue'
|
|
|
2
2
|
import { IToast } from '@/types/IToast'
|
|
3
3
|
import { Themes } from '@/enums/Themes'
|
|
4
4
|
import { ColorThemes } from '@/types/styles/ColorTheme'
|
|
5
|
+
import { ITranslations } from '@/types/ITranslations'
|
|
5
6
|
|
|
6
7
|
export interface IDSOptions {
|
|
7
8
|
drawerComponents?: Partial<VueElement>
|
|
@@ -14,4 +15,5 @@ export interface IDSOptions {
|
|
|
14
15
|
meta?: {
|
|
15
16
|
router_push?: null | Function,
|
|
16
17
|
}
|
|
18
|
+
componentTranslations?: ITranslations,
|
|
17
19
|
}
|
|
@@ -14,6 +14,11 @@ export interface ISelectGroupOption {
|
|
|
14
14
|
[SelectGroupKeys.Values]: ISelectOption[]
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export interface ISelectDefaultTranslate {
|
|
18
|
+
noResultsText?: string
|
|
19
|
+
emptyList?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
17
22
|
export type ISelectOptions = ISelectOption[]
|
|
18
23
|
export type ISelectGroupOptions = ISelectGroupOption[]
|
|
19
24
|
export type SelectListDirectionsUnion =
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { IDatepickerPlaceholders } from '@/types/IDatepicker'
|
|
2
|
+
import { ISelectDefaultTranslate } from '@/types/ISelect'
|
|
3
|
+
import { IFilterPlaceholders } from '@/types/IFilter'
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export interface ITranslations {
|
|
7
|
+
select?: ISelectDefaultTranslate
|
|
8
|
+
datePicker?: Partial<IDatepickerPlaceholders>
|
|
9
|
+
filter?: Partial<IFilterPlaceholders>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const UiSelectTranslations: ISelectDefaultTranslate = {
|
|
13
|
+
noResultsText: 'No results',
|
|
14
|
+
emptyList: 'List is empty'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const UiDatePickerTranslations: IDatepickerPlaceholders = {
|
|
18
|
+
week: 'Week',
|
|
19
|
+
month: 'Month',
|
|
20
|
+
quarter: 'Quarter',
|
|
21
|
+
year: 'Year',
|
|
22
|
+
confirm: 'Confirm'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const UiFilterTranslations: IFilterPlaceholders = {
|
|
26
|
+
main_tooltip: 'Click to open/close',
|
|
27
|
+
value: 'Value',
|
|
28
|
+
condition: 'Condition',
|
|
29
|
+
create_preset: 'Create new preset',
|
|
30
|
+
fast_filters: 'Fast filters',
|
|
31
|
+
added_filters: 'Added filters',
|
|
32
|
+
enter_preset_name: 'Enter preset name',
|
|
33
|
+
enter_preset_tooltip: 'Сохранение выбранных параметров фильтра в пользовательский пресет',
|
|
34
|
+
from: 'From',
|
|
35
|
+
to: 'To',
|
|
36
|
+
enter: 'Enter',
|
|
37
|
+
choose: 'Choose',
|
|
38
|
+
actions: {
|
|
39
|
+
add: 'Add',
|
|
40
|
+
save: 'Save',
|
|
41
|
+
clear: 'Clear',
|
|
42
|
+
create: 'Create',
|
|
43
|
+
delete_preset: 'Delete preset',
|
|
44
|
+
is: 'This',
|
|
45
|
+
is_not: 'Is not',
|
|
46
|
+
empty: 'Empty',
|
|
47
|
+
confirm: 'Confirm'
|
|
48
|
+
},
|
|
49
|
+
calendar: {
|
|
50
|
+
week: 'Week',
|
|
51
|
+
month: 'Month',
|
|
52
|
+
quarter: 'Quarter',
|
|
53
|
+
year: 'Year',
|
|
54
|
+
confirm: 'Confirm'
|
|
55
|
+
},
|
|
56
|
+
messages: {
|
|
57
|
+
same_filter: 'Уже есть фильтр с таким параметром',
|
|
58
|
+
same_preset_name: 'Уже есть фильтр с таким именем',
|
|
59
|
+
accidentally_cleared: 'Случайно очистили?',
|
|
60
|
+
accidentally_deleted: 'Случайно удалили?',
|
|
61
|
+
more_than: 'Значение "от" не может быть больше значения "до"'
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const UiComponentTranslations: ITranslations = {
|
|
66
|
+
select: UiSelectTranslations,
|
|
67
|
+
datePicker: UiDatePickerTranslations,
|
|
68
|
+
filter: UiFilterTranslations
|
|
69
|
+
}
|