sprintify-ui 0.8.69 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,398 @@
1
+ import { RawOption } from '@/types';
2
+ import { PropType } from 'vue';
3
+ declare function __VLS_template(): {
4
+ slots: {
5
+ items?(_: {
6
+ items: import("@/types").NormalizedOption[];
7
+ removeOption: (option: import("@/types").NormalizedOption) => void;
8
+ disabled: boolean;
9
+ }): any;
10
+ option?(_: {
11
+ focus: () => void;
12
+ blur: () => void;
13
+ open: () => void;
14
+ close: () => void;
15
+ keywords: import("vue").ComputedRef<string>;
16
+ option: RawOption;
17
+ selected: boolean;
18
+ active: boolean;
19
+ }): any;
20
+ empty?(_: {
21
+ firstSearch: boolean;
22
+ focus: () => void;
23
+ blur: () => void;
24
+ open: () => void;
25
+ close: () => void;
26
+ keywords: import("vue").ComputedRef<string>;
27
+ }): any;
28
+ footer?(_: {
29
+ keywords: string;
30
+ focus: () => void;
31
+ blur: () => void;
32
+ open: () => void;
33
+ close: () => void;
34
+ options: import("@/types").NormalizedOption[];
35
+ }): any;
36
+ };
37
+ refs: {
38
+ tagAutocompleteFetch: ({
39
+ $: import("vue").ComponentInternalInstance;
40
+ $data: {};
41
+ $props: Partial<{
42
+ required: boolean;
43
+ disabled: boolean;
44
+ placeholder: string;
45
+ hasError: boolean;
46
+ max: number;
47
+ focusOnMount: boolean;
48
+ queryKey: string;
49
+ }> & Omit<{
50
+ readonly required: boolean;
51
+ readonly disabled: boolean;
52
+ readonly modelValue: RawOption[];
53
+ readonly hasError: boolean;
54
+ readonly url: string;
55
+ readonly labelKey: string;
56
+ readonly valueKey: string;
57
+ readonly focusOnMount: boolean;
58
+ readonly queryKey: string;
59
+ readonly placeholder?: string | undefined;
60
+ readonly max?: number | undefined;
61
+ readonly onFocus?: ((...args: any[]) => any) | undefined;
62
+ readonly "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
63
+ readonly onScrollBottom?: ((...args: any[]) => any) | undefined;
64
+ readonly onTyping?: ((...args: any[]) => any) | undefined;
65
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "required" | "disabled" | "placeholder" | "hasError" | "max" | "focusOnMount" | "queryKey">;
66
+ $attrs: {
67
+ [x: string]: unknown;
68
+ };
69
+ $refs: {
70
+ [x: string]: unknown;
71
+ };
72
+ $slots: Readonly<{
73
+ [name: string]: import("vue").Slot<any> | undefined;
74
+ }>;
75
+ $root: import("vue").ComponentPublicInstance | null;
76
+ $parent: import("vue").ComponentPublicInstance | null;
77
+ $host: Element | null;
78
+ $emit: ((event: "focus", ...args: any[]) => void) & ((event: "update:modelValue", ...args: any[]) => void) & ((event: "scrollBottom", ...args: any[]) => void) & ((event: "typing", ...args: any[]) => void);
79
+ $el: any;
80
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
81
+ modelValue: {
82
+ required: true;
83
+ type: PropType<RawOption[]>;
84
+ };
85
+ url: {
86
+ required: true;
87
+ type: StringConstructor;
88
+ };
89
+ labelKey: {
90
+ required: true;
91
+ type: StringConstructor;
92
+ };
93
+ valueKey: {
94
+ required: true;
95
+ type: StringConstructor;
96
+ };
97
+ placeholder: {
98
+ default: undefined;
99
+ type: StringConstructor;
100
+ };
101
+ required: {
102
+ default: boolean;
103
+ type: BooleanConstructor;
104
+ };
105
+ disabled: {
106
+ default: boolean;
107
+ type: BooleanConstructor;
108
+ };
109
+ max: {
110
+ default: undefined;
111
+ type: NumberConstructor;
112
+ };
113
+ queryKey: {
114
+ default: string;
115
+ type: StringConstructor;
116
+ };
117
+ hasError: {
118
+ default: boolean;
119
+ type: BooleanConstructor;
120
+ };
121
+ focusOnMount: {
122
+ default: boolean;
123
+ type: BooleanConstructor;
124
+ };
125
+ }>> & Readonly<{
126
+ onFocus?: ((...args: any[]) => any) | undefined;
127
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
128
+ onScrollBottom?: ((...args: any[]) => any) | undefined;
129
+ onTyping?: ((...args: any[]) => any) | undefined;
130
+ }>, {
131
+ focus: () => void | undefined;
132
+ blur: () => void | undefined;
133
+ open: () => void | undefined;
134
+ close: () => void | undefined;
135
+ setKeywords: (input: string) => void | undefined;
136
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
137
+ focus: (...args: any[]) => void;
138
+ "update:modelValue": (...args: any[]) => void;
139
+ scrollBottom: (...args: any[]) => void;
140
+ typing: (...args: any[]) => void;
141
+ }, string, {
142
+ required: boolean;
143
+ disabled: boolean;
144
+ placeholder: string;
145
+ hasError: boolean;
146
+ max: number;
147
+ focusOnMount: boolean;
148
+ queryKey: string;
149
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
150
+ beforeCreate?: (() => void) | (() => void)[];
151
+ created?: (() => void) | (() => void)[];
152
+ beforeMount?: (() => void) | (() => void)[];
153
+ mounted?: (() => void) | (() => void)[];
154
+ beforeUpdate?: (() => void) | (() => void)[];
155
+ updated?: (() => void) | (() => void)[];
156
+ activated?: (() => void) | (() => void)[];
157
+ deactivated?: (() => void) | (() => void)[];
158
+ beforeDestroy?: (() => void) | (() => void)[];
159
+ beforeUnmount?: (() => void) | (() => void)[];
160
+ destroyed?: (() => void) | (() => void)[];
161
+ unmounted?: (() => void) | (() => void)[];
162
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
163
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
164
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
165
+ };
166
+ $forceUpdate: () => void;
167
+ $nextTick: typeof import("vue").nextTick;
168
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
169
+ } & Readonly<{
170
+ required: boolean;
171
+ disabled: boolean;
172
+ placeholder: string;
173
+ hasError: boolean;
174
+ max: number;
175
+ focusOnMount: boolean;
176
+ queryKey: string;
177
+ }> & Omit<Readonly<import("vue").ExtractPropTypes<{
178
+ modelValue: {
179
+ required: true;
180
+ type: PropType<RawOption[]>;
181
+ };
182
+ url: {
183
+ required: true;
184
+ type: StringConstructor;
185
+ };
186
+ labelKey: {
187
+ required: true;
188
+ type: StringConstructor;
189
+ };
190
+ valueKey: {
191
+ required: true;
192
+ type: StringConstructor;
193
+ };
194
+ placeholder: {
195
+ default: undefined;
196
+ type: StringConstructor;
197
+ };
198
+ required: {
199
+ default: boolean;
200
+ type: BooleanConstructor;
201
+ };
202
+ disabled: {
203
+ default: boolean;
204
+ type: BooleanConstructor;
205
+ };
206
+ max: {
207
+ default: undefined;
208
+ type: NumberConstructor;
209
+ };
210
+ queryKey: {
211
+ default: string;
212
+ type: StringConstructor;
213
+ };
214
+ hasError: {
215
+ default: boolean;
216
+ type: BooleanConstructor;
217
+ };
218
+ focusOnMount: {
219
+ default: boolean;
220
+ type: BooleanConstructor;
221
+ };
222
+ }>> & Readonly<{
223
+ onFocus?: ((...args: any[]) => any) | undefined;
224
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
225
+ onScrollBottom?: ((...args: any[]) => any) | undefined;
226
+ onTyping?: ((...args: any[]) => any) | undefined;
227
+ }>, "blur" | "close" | "focus" | "open" | "setKeywords" | ("required" | "disabled" | "placeholder" | "hasError" | "max" | "focusOnMount" | "queryKey")> & import("vue").ShallowUnwrapRef<{
228
+ focus: () => void | undefined;
229
+ blur: () => void | undefined;
230
+ open: () => void | undefined;
231
+ close: () => void | undefined;
232
+ setKeywords: (input: string) => void | undefined;
233
+ }> & {} & import("vue").ComponentCustomProperties & {} & {
234
+ $slots: {
235
+ items?(_: {
236
+ items: import("@/types").NormalizedOption[];
237
+ removeOption: (option: import("@/types").NormalizedOption) => void;
238
+ disabled: boolean;
239
+ }): any;
240
+ option?(_: {
241
+ focus: () => void;
242
+ blur: () => void;
243
+ open: () => void;
244
+ close: () => void;
245
+ keywords: import("vue").ComputedRef<string>;
246
+ option: RawOption;
247
+ selected: boolean;
248
+ active: boolean;
249
+ }): any;
250
+ footer?(_: {
251
+ keywords: string;
252
+ focus: () => void;
253
+ blur: () => void;
254
+ open: () => void;
255
+ close: () => void;
256
+ options: import("@/types").NormalizedOption[];
257
+ }): any;
258
+ empty?(_: {
259
+ firstSearch: boolean;
260
+ focus: () => void;
261
+ blur: () => void;
262
+ open: () => void;
263
+ close: () => void;
264
+ keywords: import("vue").ComputedRef<string>;
265
+ }): any;
266
+ };
267
+ }) | null;
268
+ };
269
+ attrs: Partial<{}>;
270
+ };
271
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
272
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
273
+ modelValue: {
274
+ default: undefined;
275
+ type: PropType<string[] | string | number | null | undefined>;
276
+ };
277
+ url: {
278
+ required: true;
279
+ type: StringConstructor;
280
+ };
281
+ showRouteUrl: {
282
+ default: undefined;
283
+ type: PropType<((ids: (string | number)[]) => string) | undefined>;
284
+ };
285
+ primaryKey: {
286
+ default: string;
287
+ type: StringConstructor;
288
+ };
289
+ field: {
290
+ required: true;
291
+ type: StringConstructor;
292
+ };
293
+ required: {
294
+ default: boolean;
295
+ type: BooleanConstructor;
296
+ };
297
+ disabled: {
298
+ default: boolean;
299
+ type: BooleanConstructor;
300
+ };
301
+ placeholder: {
302
+ default: undefined;
303
+ type: StringConstructor;
304
+ };
305
+ max: {
306
+ default: undefined;
307
+ type: NumberConstructor;
308
+ };
309
+ queryKey: {
310
+ default: string;
311
+ type: StringConstructor;
312
+ };
313
+ currentModels: {
314
+ default(): undefined;
315
+ type: PropType<RawOption[] | undefined>;
316
+ };
317
+ hasError: {
318
+ default: boolean;
319
+ type: BooleanConstructor;
320
+ };
321
+ }>, {
322
+ focus: () => void | undefined;
323
+ blur: () => void | undefined;
324
+ open: () => void | undefined;
325
+ close: () => void | undefined;
326
+ setKeywords: (input: string) => void | undefined;
327
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
328
+ "update:modelValue": (...args: any[]) => void;
329
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
330
+ modelValue: {
331
+ default: undefined;
332
+ type: PropType<string[] | string | number | null | undefined>;
333
+ };
334
+ url: {
335
+ required: true;
336
+ type: StringConstructor;
337
+ };
338
+ showRouteUrl: {
339
+ default: undefined;
340
+ type: PropType<((ids: (string | number)[]) => string) | undefined>;
341
+ };
342
+ primaryKey: {
343
+ default: string;
344
+ type: StringConstructor;
345
+ };
346
+ field: {
347
+ required: true;
348
+ type: StringConstructor;
349
+ };
350
+ required: {
351
+ default: boolean;
352
+ type: BooleanConstructor;
353
+ };
354
+ disabled: {
355
+ default: boolean;
356
+ type: BooleanConstructor;
357
+ };
358
+ placeholder: {
359
+ default: undefined;
360
+ type: StringConstructor;
361
+ };
362
+ max: {
363
+ default: undefined;
364
+ type: NumberConstructor;
365
+ };
366
+ queryKey: {
367
+ default: string;
368
+ type: StringConstructor;
369
+ };
370
+ currentModels: {
371
+ default(): undefined;
372
+ type: PropType<RawOption[] | undefined>;
373
+ };
374
+ hasError: {
375
+ default: boolean;
376
+ type: BooleanConstructor;
377
+ };
378
+ }>> & Readonly<{
379
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
380
+ }>, {
381
+ required: boolean;
382
+ disabled: boolean;
383
+ modelValue: string | number | string[] | null | undefined;
384
+ placeholder: string;
385
+ hasError: boolean;
386
+ max: number;
387
+ queryKey: string;
388
+ primaryKey: string;
389
+ showRouteUrl: ((ids: (string | number)[]) => string) | undefined;
390
+ currentModels: RawOption[] | undefined;
391
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
392
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
393
+ export default _default;
394
+ type __VLS_WithTemplateSlots<T, S> = T & {
395
+ new (): {
396
+ $slots: S;
397
+ };
398
+ };
@@ -46,6 +46,7 @@ import BaseFileUploader from './BaseFileUploader.vue';
46
46
  import BaseForm from './BaseForm.vue';
47
47
  import BaseGantt from './BaseGantt.vue';
48
48
  import BaseHasMany from './BaseHasMany.vue';
49
+ import BaseHasManyFetch from './BaseHasManyFetch.vue';
49
50
  import BaseHeader from './BaseHeader.vue';
50
51
  import { Icon as BaseIcon } from '@iconify/vue';
51
52
  import BaseIconPicker from './BaseIconPicker.vue';
@@ -104,4 +105,4 @@ import BaseLayoutStacked from './BaseLayoutStacked.vue';
104
105
  import BaseLayoutStackedConfigurable from './BaseLayoutStackedConfigurable.vue';
105
106
  import BaseLayoutSidebar from './BaseLayoutSidebar.vue';
106
107
  import BaseLayoutSidebarConfigurable from './BaseLayoutSidebarConfigurable.vue';
107
- export { BaseActionItem, BaseAddressForm, BaseAlert, BaseApp, BaseAppDialogs, BaseAppSnackbars, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseAvatarGroup, BaseBadge, BaseBelongsTo, BaseBelongsToFetch, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, BaseCard, BaseCardRow, BaseCharacterCounter, BaseClipboard, BaseCalendar, BaseCollapse, BaseColor, BaseContainer, BaseCounter, BaseCropper, BaseCropperModal, BaseDataIterator, BaseDataTable, BaseDatePicker, BaseDateSelect, BaseDescriptionList, BaseDescriptionListItem, BaseDialog, BaseDisplayRelativeTime, BaseDropdown, BaseDropdownAutocomplete, BaseEmptyState, BaseField, BaseFieldI18n, BaseFilePicker, BaseFilePickerCrop, BaseFileUploader, BaseForm, BaseGantt, BaseHasMany, BaseHeader, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseJsonReader, BaseLazy, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNavbarSideItem, BasePagination, BasePanel, BasePassword, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseRichText, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseStepper, BaseStepperItem, BaseSwitch, BaseSystemAlert, BaseTable, BaseTableBody, BaseTableCell, BaseTableHead, BaseTableHeader, BaseTableRow, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseTimePicker, BaseTooltip, BaseUniqueCode, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
108
+ export { BaseActionItem, BaseAddressForm, BaseAlert, BaseApp, BaseAppDialogs, BaseAppSnackbars, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseAvatarGroup, BaseBadge, BaseBelongsTo, BaseBelongsToFetch, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, BaseCard, BaseCardRow, BaseCharacterCounter, BaseClipboard, BaseCalendar, BaseCollapse, BaseColor, BaseContainer, BaseCounter, BaseCropper, BaseCropperModal, BaseDataIterator, BaseDataTable, BaseDatePicker, BaseDateSelect, BaseDescriptionList, BaseDescriptionListItem, BaseDialog, BaseDisplayRelativeTime, BaseDropdown, BaseDropdownAutocomplete, BaseEmptyState, BaseField, BaseFieldI18n, BaseFilePicker, BaseFilePickerCrop, BaseFileUploader, BaseForm, BaseGantt, BaseHasMany, BaseHasManyFetch, BaseHeader, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseJsonReader, BaseLazy, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNavbarSideItem, BasePagination, BasePanel, BasePassword, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseRichText, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseStepper, BaseStepperItem, BaseSwitch, BaseSystemAlert, BaseTable, BaseTableBody, BaseTableCell, BaseTableHead, BaseTableHeader, BaseTableRow, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseTimePicker, BaseTooltip, BaseUniqueCode, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.8.69",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -15,13 +15,9 @@ export default {
15
15
  },
16
16
  },
17
17
  args: {
18
- url: "https://faker.witify.io/api/todos",
19
- field: "name",
20
- primaryKey: "id",
21
- showRouteUrl: (ids) => {
22
- const params = QueryString.stringify({ filter: { id: ids } });
23
- return `https://faker.witify.io/api/todos?${params}`;
24
- },
18
+ options: options,
19
+ field: "label",
20
+ primaryKey: "value",
25
21
  },
26
22
  decorators: [() => ({ template: '<div class="mb-36"><story/></div>' })],
27
23
  };
@@ -30,18 +26,13 @@ const Template = (args) => {
30
26
  return {
31
27
  components: { BaseHasMany, ShowValue, BaseAppSnackbars },
32
28
  setup() {
33
- const value = ref(4);
34
- const currentModels = ref([
35
- { id: 4, name: "Todo 4 (local)" },
36
- { id: 6, name: "Todo 6 (local)" },
37
- ]);
38
- return { args, value, currentModels };
29
+ const value = ref([options[4].value]);
30
+ return { args, value };
39
31
  },
40
32
  template: `
41
33
  <BaseHasMany
42
34
  v-model="value"
43
35
  v-bind="args"
44
- :current-models="currentModels"
45
36
  ></BaseHasMany>
46
37
  <ShowValue :value="value" />
47
38
  <BaseAppSnackbars />
@@ -56,15 +47,12 @@ export const Disabled = (args) => {
56
47
  return {
57
48
  components: { BaseHasMany, ShowValue },
58
49
  setup() {
59
- // current model is incorrect, to test component's resilience
60
- const currentModel = options[1];
61
- const value = ref([7]);
62
- return { args, value, currentModel };
50
+ const value = ref([options[2].value]);
51
+ return { args, value };
63
52
  },
64
53
  template: `<BaseHasMany
65
54
  v-bind="args"
66
55
  v-model="value"
67
- :current-models="[currentModel]"
68
56
  :disabled="true"
69
57
  ></BaseHasMany>
70
58
  <ShowValue :value="value" />`,
@@ -76,15 +64,6 @@ Maximum.args = {
76
64
  max: 3,
77
65
  };
78
66
 
79
- export const ShowRouteUrl = Template.bind({});
80
- ShowRouteUrl.args = {
81
- max: 3,
82
- showRouteUrl: (ids) => {
83
- const params = QueryString.stringify({ filter: { id: ids } });
84
- return `https://faker.witify.io/api/todos?${params}`;
85
- },
86
- };
87
-
88
67
  export const Sizes = (args) => ({
89
68
  components: { BaseHasMany },
90
69
  setup() {
@@ -122,8 +101,7 @@ export const SlotOption = (args) => {
122
101
  'bg-blue-600 text-white hover:bg-blue-700': active && selected,
123
102
  }"
124
103
  >
125
- <p class="text-sm font-medium">{{ option.title }}</p>
126
- <p class="opacity-60 text-xs">{{ option.owner?.name }}</p>
104
+ <p class="opacity-60 text-xs">{{ option.label }}</p>
127
105
  </div>
128
106
  </template>
129
107
  </BaseHasMany>
@@ -221,49 +199,6 @@ export const SlotEmpty = (args) => {
221
199
  };
222
200
  };
223
201
 
224
- const RaceConditionTemplate = (args) => {
225
- return {
226
- components: { BaseHasMany, ShowValue, BaseAppSnackbars },
227
- setup() {
228
- const value = ref(["4", "6"]);
229
-
230
- const valueExternal = ref([]);
231
-
232
- const intervalId = setInterval(() => {
233
- const newValue = [random(1, 10)];
234
- value.value = newValue;
235
- valueExternal.value = newValue;
236
- }, 300);
237
-
238
- setTimeout(() => {
239
- clearInterval(intervalId);
240
- }, 1000);
241
-
242
- return { args, value, valueExternal };
243
- },
244
- template: `
245
- <BaseHasMany
246
- v-model="value"
247
- v-bind="args"
248
- ></BaseHasMany>
249
-
250
- <br>
251
-
252
- <p class="-mb-4">Value from data</p>
253
- <ShowValue :value="valueExternal" />
254
-
255
- <br>
256
-
257
- <p class="-mb-4">Value from component</p>
258
- <ShowValue :value="value" />
259
- <BaseAppSnackbars />
260
- `,
261
- };
262
- };
263
-
264
- export const RaceCondition = RaceConditionTemplate.bind({});
265
- RaceCondition.args = {};
266
-
267
202
  export const Field = createFieldStory({
268
203
  component: BaseHasMany,
269
204
  componentName: "BaseHasMany",