sprintify-ui 0.8.34 → 0.8.37
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/README.md +1 -1
- package/dist/sprintify-ui.es.js +7597 -7492
- package/dist/types/components/BaseActionItem.vue.d.ts +12 -2
- package/dist/types/components/BaseActionItemButton.vue.d.ts +3 -3
- package/dist/types/components/BaseAddressForm.vue.d.ts +19 -19
- package/dist/types/components/BaseAlert.vue.d.ts +19 -17
- package/dist/types/components/BaseApp.vue.d.ts +4 -2
- package/dist/types/components/BaseAppDialogs.vue.d.ts +2 -2
- package/dist/types/components/BaseAutocomplete.vue.d.ts +47 -44
- package/dist/types/components/BaseAutocompleteDrawer.vue.d.ts +22 -19
- package/dist/types/components/BaseAutocompleteFetch.vue.d.ts +44 -41
- package/dist/types/components/BaseAvatar.vue.d.ts +4 -4
- package/dist/types/components/BaseAvatarGroup.vue.d.ts +1 -1
- package/dist/types/components/BaseBadge.vue.d.ts +22 -19
- package/dist/types/components/BaseBelongsTo.vue.d.ts +38 -35
- package/dist/types/components/BaseBelongsToFetch.vue.d.ts +39 -36
- package/dist/types/components/BaseButton.vue.d.ts +54 -31
- package/dist/types/components/BaseButtonGroup.vue.d.ts +22 -19
- package/dist/types/components/BaseCalendar.vue.d.ts +24 -22
- package/dist/types/components/BaseCard.vue.d.ts +6 -4
- package/dist/types/components/BaseCardRow.vue.d.ts +9 -7
- package/dist/types/components/BaseCharacterCounter.vue.d.ts +1 -1
- package/dist/types/components/BaseClipboard.vue.d.ts +6 -4
- package/dist/types/components/BaseCollapse.vue.d.ts +34 -32
- package/dist/types/components/BaseColor.vue.d.ts +5 -4
- package/dist/types/components/BaseContainer.vue.d.ts +19 -13
- package/dist/types/components/BaseCounter.vue.d.ts +1 -1
- package/dist/types/components/BaseCropper.vue.d.ts +24 -22
- package/dist/types/components/BaseCropperModal.vue.d.ts +4 -4
- package/dist/types/components/BaseDataIterator.vue.d.ts +13 -24
- package/dist/types/components/BaseDataIteratorSectionBox.vue.d.ts +6 -4
- package/dist/types/components/BaseDataIteratorSectionColumns.vue.d.ts +3 -818
- package/dist/types/components/BaseDataIteratorSectionModal.vue.d.ts +6 -4
- package/dist/types/components/BaseDataTable.vue.d.ts +37 -40
- package/dist/types/components/BaseDataTableRowAction.vue.d.ts +2 -2
- package/dist/types/components/BaseDataTableTemplate.vue.d.ts +28 -25
- package/dist/types/components/BaseDatePicker.vue.d.ts +33 -33
- package/dist/types/components/BaseDateSelect.vue.d.ts +3 -2
- package/dist/types/components/BaseDescriptionList.vue.d.ts +4 -2
- package/dist/types/components/BaseDescriptionListItem.vue.d.ts +4 -2
- package/dist/types/components/BaseDialog.vue.d.ts +9 -7
- package/dist/types/components/BaseDisplayRelativeTime.vue.d.ts +9 -7
- package/dist/types/components/BaseDraggable.vue.d.ts +10 -8
- package/dist/types/components/BaseDropdown.vue.d.ts +10 -8
- package/dist/types/components/BaseDropdownAutocomplete.vue.d.ts +20 -18
- package/dist/types/components/BaseField.vue.d.ts +11 -8
- package/dist/types/components/BaseFieldI18n.vue.d.ts +6 -6
- package/dist/types/components/BaseFilePicker.vue.d.ts +24 -22
- package/dist/types/components/BaseFilePickerCrop.vue.d.ts +18 -16
- package/dist/types/components/BaseFileUploader.vue.d.ts +58 -56
- package/dist/types/components/BaseForm.vue.d.ts +21 -19
- package/dist/types/components/BaseGantt.vue.d.ts +20 -411
- package/dist/types/components/BaseHasMany.vue.d.ts +39 -37
- package/dist/types/components/BaseHeader.vue.d.ts +20 -20
- package/dist/types/components/BaseIconPicker.vue.d.ts +7 -7
- package/dist/types/components/BaseInput.vue.d.ts +32 -31
- package/dist/types/components/BaseInputError.vue.d.ts +9 -6
- package/dist/types/components/BaseInputLabel.vue.d.ts +3 -2
- package/dist/types/components/BaseInputPercent.vue.d.ts +8 -8
- package/dist/types/components/BaseJsonReader.vue.d.ts +7 -7
- package/dist/types/components/BaseJsonReaderItem.vue.d.ts +4 -4
- package/dist/types/components/BaseLayoutNotificationDropdown.vue.d.ts +1 -1
- package/dist/types/components/BaseLayoutSidebar.vue.d.ts +13 -10
- package/dist/types/components/BaseLayoutSidebarConfigurable.vue.d.ts +10 -8
- package/dist/types/components/BaseLayoutStacked.vue.d.ts +25 -23
- package/dist/types/components/BaseLayoutStackedConfigurable.vue.d.ts +9 -7
- package/dist/types/components/BaseLoadingCover.vue.d.ts +3 -3
- package/dist/types/components/BaseMediaGallery.vue.d.ts +1 -1
- package/dist/types/components/BaseMediaLibrary.vue.d.ts +39 -38
- package/dist/types/components/BaseMediaList.vue.d.ts +1 -1
- package/dist/types/components/BaseMediaListItem.vue.d.ts +1 -1
- package/dist/types/components/BaseMediaPictures.vue.d.ts +1 -1
- package/dist/types/components/BaseMenu.vue.d.ts +26 -18
- package/dist/types/components/BaseMenuItem.vue.d.ts +5 -5
- package/dist/types/components/BaseModalCenter.vue.d.ts +8 -6
- package/dist/types/components/BaseModalSide.vue.d.ts +8 -6
- package/dist/types/components/BaseNavbar.vue.d.ts +17 -15
- package/dist/types/components/BaseNavbarItem.vue.d.ts +1 -1
- package/dist/types/components/BaseNavbarItemContent.vue.d.ts +4 -4
- package/dist/types/components/BaseNavbarSideItem.vue.d.ts +1 -1
- package/dist/types/components/BaseNavbarSideItemContent.vue.d.ts +4 -4
- package/dist/types/components/BasePanel.vue.d.ts +1 -1
- package/dist/types/components/BasePassword.vue.d.ts +6 -5
- package/dist/types/components/BaseProgressCircle.vue.d.ts +2 -2
- package/dist/types/components/BaseRadioGroup.vue.d.ts +10 -8
- package/dist/types/components/BaseReadMore.vue.d.ts +6 -4
- package/dist/types/components/BaseRichText.vue.d.ts +6 -5
- package/dist/types/components/BaseScrollColumn.vue.d.ts +1 -1
- package/dist/types/components/BaseSelect.vue.d.ts +13 -10
- package/dist/types/components/BaseShortcut.vue.d.ts +4 -4
- package/dist/types/components/BaseSideNavigation.vue.d.ts +8 -6
- package/dist/types/components/BaseSideNavigationItem.vue.d.ts +12 -10
- package/dist/types/components/BaseStatistic.vue.d.ts +1 -1
- package/dist/types/components/BaseSwitch.vue.d.ts +14 -12
- package/dist/types/components/BaseSystemAlert.vue.d.ts +13 -11
- package/dist/types/components/BaseTabItem.vue.d.ts +12 -10
- package/dist/types/components/BaseTable.vue.d.ts +27 -24
- package/dist/types/components/BaseTableBody.vue.d.ts +4 -2
- package/dist/types/components/BaseTableCell.vue.d.ts +29 -27
- package/dist/types/components/BaseTableColumn.vue.d.ts +11 -11
- package/dist/types/components/BaseTableHead.vue.d.ts +6 -4
- package/dist/types/components/BaseTableHeader.vue.d.ts +11 -9
- package/dist/types/components/BaseTableRow.vue.d.ts +20 -18
- package/dist/types/components/BaseTabs.vue.d.ts +8 -6
- package/dist/types/components/BaseTagAutocomplete.vue.d.ts +47 -44
- package/dist/types/components/BaseTagAutocompleteFetch.vue.d.ts +40 -38
- package/dist/types/components/BaseTextarea.vue.d.ts +8 -7
- package/dist/types/components/BaseTextareaAutoresize.vue.d.ts +7 -6
- package/dist/types/components/BaseTimePicker.vue.d.ts +4 -3
- package/dist/types/components/BaseTooltip.vue.d.ts +15 -13
- package/dist/types/composables/breakpoints.d.ts +6 -6
- package/dist/types/composables/mediaQuery.d.ts +1 -1
- package/dist/types/composables/modal.d.ts +1 -1
- package/package.json +14 -20
- package/src/components/BaseAddressForm.stories.js +32 -33
- package/src/components/BaseAlert.stories.js +13 -13
- package/src/components/BaseAutocomplete.stories.js +26 -26
- package/src/components/BaseAutocomplete.vue +10 -3
- package/src/components/BaseAutocompleteFetch.stories.js +24 -28
- package/src/components/BaseAvatar.stories.js +11 -11
- package/src/components/BaseAvatarGroup.stories.js +9 -9
- package/src/components/BaseBadge.stories.js +18 -19
- package/src/components/BaseBelongsTo.stories.js +20 -20
- package/src/components/BaseBelongsToFetch.stories.js +21 -25
- package/src/components/BaseBoolean.stories.js +3 -3
- package/src/components/BaseBreadcrumbs.stories.js +14 -14
- package/src/components/BaseButton.stories.js +34 -34
- package/src/components/BaseButtonGroup.stories.js +18 -18
- package/src/components/BaseCalendar.stories.js +122 -46
- package/src/components/BaseCard.stories.js +3 -3
- package/src/components/BaseCharacterCounter.stories.js +5 -5
- package/src/components/BaseClipboard.stories.js +6 -6
- package/src/components/BaseCollapse.stories.js +81 -82
- package/src/components/BaseColor.stories.js +8 -8
- package/src/components/BaseContainer.stories.js +6 -6
- package/src/components/BaseCounter.stories.js +9 -9
- package/src/components/BaseCropper.stories.js +11 -11
- package/src/components/BaseCropperModal.stories.js +6 -6
- package/src/components/BaseDataIterator.stories.js +30 -33
- package/src/components/BaseDataTable.stories.js +61 -56
- package/src/components/BaseDatePicker.stories.js +29 -29
- package/src/components/BaseDateSelect.stories.js +9 -9
- package/src/components/BaseDescriptionList.stories.js +4 -4
- package/src/components/BaseDialog.stories.js +27 -27
- package/src/components/BaseDisplayRelativeTime.stories.js +4 -4
- package/src/components/BaseDropdown.stories.js +13 -13
- package/src/components/BaseDropdownAutocomplete.stories.js +25 -25
- package/src/components/BaseFieldI18n.stories.js +9 -9
- package/src/components/BaseFilePicker.stories.js +8 -8
- package/src/components/BaseFilePickerCrop.stories.js +15 -15
- package/src/components/BaseFileUploader.stories.js +12 -13
- package/src/components/BaseForm.stories.js +7 -7
- package/src/components/BaseForm.vue +1 -1
- package/src/components/BaseGantt.stories.js +22 -16
- package/src/components/BaseHasMany.stories.js +18 -22
- package/src/components/BaseHeader.stories.js +43 -43
- package/src/components/BaseIconPicker.stories.js +4 -4
- package/src/components/BaseInput.stories.js +48 -48
- package/src/components/BaseInputLabel.stories.js +6 -6
- package/src/components/BaseInputPercent.stories.js +8 -8
- package/src/components/BaseJsonReader.stories.js +42 -49
- package/src/components/BaseJsonReader.vue +0 -1
- package/src/components/BaseLayoutSidebar.vue +1 -1
- package/src/components/BaseLayoutSidebarConfigurable.stories.js +72 -73
- package/src/components/BaseLayoutSidebarConfigurable.vue +1 -1
- package/src/components/BaseLayoutStackedConfigurable.stories.js +68 -69
- package/src/components/BaseLoadingCover.stories.js +9 -9
- package/src/components/BaseMediaItem.stories.js +10 -10
- package/src/components/BaseMediaLibrary.stories.js +58 -58
- package/src/components/BaseMediaPreview.stories.js +21 -21
- package/src/components/BaseMenu.stories.js +34 -34
- package/src/components/BaseModalCenter.stories.js +9 -9
- package/src/components/BaseModalSide.stories.js +6 -6
- package/src/components/BaseNavbar.stories.js +26 -26
- package/src/components/BasePagination.stories.js +2 -2
- package/src/components/BasePanel.stories.js +9 -9
- package/src/components/BasePassword.stories.js +11 -12
- package/src/components/BaseProgressCircle.stories.js +3 -3
- package/src/components/BaseRadioGroup.stories.js +15 -15
- package/src/components/BaseReadMore.stories.js +3 -3
- package/src/components/BaseRichText.stories.js +32 -32
- package/src/components/BaseSelect.stories.js +19 -19
- package/src/components/BaseShortcut.stories.js +28 -28
- package/src/components/BaseSideNavigation.stories.js +11 -11
- package/src/components/BaseSkeleton.stories.js +3 -3
- package/src/components/BaseStatistic.stories.js +16 -16
- package/src/components/BaseStepper.stories.js +29 -29
- package/src/components/BaseStepperItem.stories.js +11 -11
- package/src/components/BaseSwitch.stories.js +25 -25
- package/src/components/BaseSystemAlert.stories.js +7 -7
- package/src/components/BaseTable.stories.js +14 -16
- package/src/components/BaseTabs.stories.js +12 -13
- package/src/components/BaseTagAutocomplete.stories.js +19 -19
- package/src/components/BaseTagAutocompleteFetch.stories.js +11 -11
- package/src/components/BaseTextarea.stories.js +10 -10
- package/src/components/BaseTextareaAutoresize.stories.js +13 -13
- package/src/components/BaseTimePicker.stories.js +9 -9
- package/src/components/BaseTimeline.stories.js +22 -22
- package/src/components/BaseTimelineItem.stories.js +23 -22
- package/src/components/BaseToast.stories.js +6 -6
- package/src/components/BaseTooltip.stories.js +27 -27
- package/src/components/BaseUniqueCode.stories.js +7 -7
- package/src/stories/InputSizes.stories.js +13 -14
- package/src/stories/List.stories.js +92 -92
- package/src/stories/Show.stories.js +13 -14
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import BaseCropper from
|
|
2
|
-
import BaseLoadingCover from
|
|
3
|
-
import BaseAppSnackbars from
|
|
4
|
-
import { Icon as BaseIcon } from
|
|
1
|
+
import BaseCropper from "@/components/BaseCropper.vue";
|
|
2
|
+
import BaseLoadingCover from "@/components/BaseLoadingCover.vue";
|
|
3
|
+
import BaseAppSnackbars from "@/components/BaseAppSnackbars.vue";
|
|
4
|
+
import { Icon as BaseIcon } from "@iconify/vue";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title:
|
|
7
|
+
title: "Media/BaseCropper",
|
|
8
8
|
component: BaseCropper,
|
|
9
9
|
args: {
|
|
10
10
|
source:
|
|
11
|
-
|
|
11
|
+
"https://images.unsplash.com/photo-1560250097-0b93528c311a?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&q=80",
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -24,8 +24,8 @@ const Template = (args) => ({
|
|
|
24
24
|
|
|
25
25
|
function saveAsCanvas() {
|
|
26
26
|
cropperRef.value.save({
|
|
27
|
-
type:
|
|
28
|
-
size:
|
|
27
|
+
type: "canvas",
|
|
28
|
+
size: "original",
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -87,7 +87,7 @@ Demo.args = {
|
|
|
87
87
|
viewport: {
|
|
88
88
|
width: 200,
|
|
89
89
|
height: 200,
|
|
90
|
-
type:
|
|
90
|
+
type: "rectangle",
|
|
91
91
|
},
|
|
92
92
|
boundary: {
|
|
93
93
|
width: 200,
|
|
@@ -99,13 +99,13 @@ Demo.args = {
|
|
|
99
99
|
export const Avatar = Template.bind({});
|
|
100
100
|
|
|
101
101
|
Avatar.args = {
|
|
102
|
-
preset:
|
|
102
|
+
preset: "avatar",
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
export const Cover = Template.bind({});
|
|
106
106
|
|
|
107
107
|
Cover.args = {
|
|
108
|
-
preset:
|
|
108
|
+
preset: "cover",
|
|
109
109
|
presetOptions: {
|
|
110
110
|
size: 400,
|
|
111
111
|
ratio: 16 / 9,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import BaseCropperModal from
|
|
2
|
-
import BaseAppSnackbars from
|
|
1
|
+
import BaseCropperModal from "@/components/BaseCropperModal.vue";
|
|
2
|
+
import BaseAppSnackbars from "@/components/BaseAppSnackbars.vue";
|
|
3
3
|
|
|
4
4
|
const source =
|
|
5
|
-
|
|
5
|
+
"https://images.unsplash.com/photo-1560250097-0b93528c311a?auto=format&fit=crop&q=80";
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
|
-
title:
|
|
8
|
+
title: "Media/BaseCropperModal",
|
|
9
9
|
component: BaseCropperModal,
|
|
10
10
|
args: {},
|
|
11
11
|
};
|
|
@@ -32,7 +32,7 @@ Avatar.args = {
|
|
|
32
32
|
config: {
|
|
33
33
|
maxWidth: 300,
|
|
34
34
|
},
|
|
35
|
-
preset:
|
|
35
|
+
preset: "avatar",
|
|
36
36
|
presetOptions: {
|
|
37
37
|
size: 300,
|
|
38
38
|
},
|
|
@@ -46,7 +46,7 @@ Cover.args = {
|
|
|
46
46
|
config: {
|
|
47
47
|
maxWidth: 600,
|
|
48
48
|
},
|
|
49
|
-
preset:
|
|
49
|
+
preset: "cover",
|
|
50
50
|
presetOptions: {
|
|
51
51
|
size: 600,
|
|
52
52
|
},
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import BaseDataIterator from
|
|
2
|
-
import BaseSelect from
|
|
3
|
-
import BaseCard from
|
|
4
|
-
import BaseCardRow from
|
|
5
|
-
import BaseLoadingCover from
|
|
6
|
-
import { options, sizes } from
|
|
7
|
-
import { computed } from
|
|
1
|
+
import BaseDataIterator from "./BaseDataIterator.vue";
|
|
2
|
+
import BaseSelect from "./BaseSelect.vue";
|
|
3
|
+
import BaseCard from "./BaseCard.vue";
|
|
4
|
+
import BaseCardRow from "./BaseCardRow.vue";
|
|
5
|
+
import BaseLoadingCover from "./BaseLoadingCover.vue";
|
|
6
|
+
import { options, sizes } from "../../.storybook/utils";
|
|
7
|
+
import { computed } from "vue";
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
|
-
title:
|
|
10
|
+
title: "Data/BaseDataIterator",
|
|
11
11
|
component: BaseDataIterator,
|
|
12
12
|
argTypes: {
|
|
13
13
|
size: {
|
|
14
|
-
control: { type:
|
|
14
|
+
control: { type: "select" },
|
|
15
15
|
options: sizes,
|
|
16
16
|
},
|
|
17
17
|
filtersPosition: {
|
|
18
|
-
control: { type:
|
|
19
|
-
options: [
|
|
18
|
+
control: { type: "select" },
|
|
19
|
+
options: ["top", "section"],
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
args: {
|
|
23
|
-
url:
|
|
23
|
+
url: "https://effettandem.com/api/content/articles",
|
|
24
24
|
urlQuery: {
|
|
25
25
|
per_page: 5,
|
|
26
26
|
},
|
|
@@ -121,7 +121,7 @@ const Template = (args) => ({
|
|
|
121
121
|
|
|
122
122
|
setTimeout(() => {
|
|
123
123
|
urlQuery.value = {
|
|
124
|
-
type:
|
|
124
|
+
type: "video",
|
|
125
125
|
};
|
|
126
126
|
}, 3000);
|
|
127
127
|
|
|
@@ -135,21 +135,21 @@ Demo.args = {
|
|
|
135
135
|
searchable: true,
|
|
136
136
|
actions: [
|
|
137
137
|
{
|
|
138
|
-
label:
|
|
139
|
-
icon:
|
|
140
|
-
href:
|
|
138
|
+
label: "Open Google",
|
|
139
|
+
icon: "heroicons:link",
|
|
140
|
+
href: "https://google.com",
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
|
-
label:
|
|
144
|
-
icon:
|
|
145
|
-
action: () => alert(
|
|
143
|
+
label: "Export",
|
|
144
|
+
icon: "heroicons:table-cells",
|
|
145
|
+
action: () => alert("export!"),
|
|
146
146
|
},
|
|
147
147
|
{ meta: { line: true } },
|
|
148
148
|
{
|
|
149
|
-
label:
|
|
150
|
-
icon:
|
|
151
|
-
action: () => alert(
|
|
152
|
-
color:
|
|
149
|
+
label: "Delete all",
|
|
150
|
+
icon: "heroicons:trash",
|
|
151
|
+
action: () => alert("Delete All!"),
|
|
152
|
+
color: "danger",
|
|
153
153
|
},
|
|
154
154
|
],
|
|
155
155
|
};
|
|
@@ -216,21 +216,18 @@ const LocalDataTemplate = (args) => ({
|
|
|
216
216
|
BaseSelect,
|
|
217
217
|
},
|
|
218
218
|
setup() {
|
|
219
|
-
|
|
220
219
|
const baseDataIteratorRef = ref(null);
|
|
221
220
|
|
|
222
221
|
const filteredItems = computed(() => {
|
|
223
|
-
return options
|
|
224
|
-
.filter
|
|
225
|
-
|
|
226
|
-
const type = baseDataIteratorRef.value?.query?.filter?.type ?? null;
|
|
222
|
+
return options.filter((item) => {
|
|
223
|
+
const type = baseDataIteratorRef.value?.query?.filter?.type ?? null;
|
|
227
224
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
if (type) {
|
|
226
|
+
return item.type === type;
|
|
227
|
+
}
|
|
231
228
|
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
return true;
|
|
230
|
+
});
|
|
234
231
|
});
|
|
235
232
|
|
|
236
233
|
return { args, filteredItems, baseDataIteratorRef };
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import BaseDataTable from
|
|
2
|
-
import BaseTableColumn from
|
|
3
|
-
import BaseBoolean from
|
|
4
|
-
import BaseSelect from
|
|
5
|
-
import BaseBadge from
|
|
6
|
-
import BaseAppSnackbars from
|
|
7
|
-
import BaseAppDialogs from
|
|
8
|
-
import { computed, onBeforeUnmount } from
|
|
9
|
-
import { DateTime } from
|
|
10
|
-
import { optionsLarge, templateDataTable } from
|
|
11
|
-
import { cloneDeep } from
|
|
1
|
+
import BaseDataTable from "./BaseDataTable.vue";
|
|
2
|
+
import BaseTableColumn from "./BaseTableColumn.vue";
|
|
3
|
+
import BaseBoolean from "./BaseBoolean.vue";
|
|
4
|
+
import BaseSelect from "./BaseSelect.vue";
|
|
5
|
+
import BaseBadge from "./BaseBadge.vue";
|
|
6
|
+
import BaseAppSnackbars from "./BaseAppSnackbars.vue";
|
|
7
|
+
import BaseAppDialogs from "./BaseAppDialogs.vue";
|
|
8
|
+
import { computed, onBeforeUnmount } from "vue";
|
|
9
|
+
import { DateTime } from "luxon";
|
|
10
|
+
import { optionsLarge, templateDataTable } from "../../.storybook/utils";
|
|
11
|
+
import { cloneDeep } from "lodash";
|
|
12
12
|
|
|
13
13
|
export default {
|
|
14
|
-
title:
|
|
14
|
+
title: "Data/BaseDataTable",
|
|
15
15
|
component: BaseDataTable,
|
|
16
16
|
argTypes: {
|
|
17
17
|
layout: {
|
|
18
|
-
control: { type:
|
|
19
|
-
options: [
|
|
18
|
+
control: { type: "select" },
|
|
19
|
+
options: ["default", "compact"],
|
|
20
20
|
},
|
|
21
21
|
size: {
|
|
22
|
-
control: { type:
|
|
23
|
-
options: [
|
|
22
|
+
control: { type: "select" },
|
|
23
|
+
options: ["sm", "md"],
|
|
24
24
|
},
|
|
25
25
|
filtersPosition: {
|
|
26
|
-
control: { type:
|
|
27
|
-
options: [
|
|
26
|
+
control: { type: "select" },
|
|
27
|
+
options: ["top", "section"],
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
args: {
|
|
31
|
-
url:
|
|
31
|
+
url: "https://effettandem.com/api/content/articles",
|
|
32
32
|
urlQuery: {
|
|
33
33
|
per_page: 100,
|
|
34
34
|
},
|
|
@@ -51,10 +51,10 @@ const componentProps = {
|
|
|
51
51
|
return `/articles/${row.id}`;
|
|
52
52
|
},
|
|
53
53
|
editUrl() {
|
|
54
|
-
return
|
|
54
|
+
return "/";
|
|
55
55
|
},
|
|
56
56
|
deleteUrl() {
|
|
57
|
-
return
|
|
57
|
+
return "/";
|
|
58
58
|
},
|
|
59
59
|
detailed: true,
|
|
60
60
|
searchable: true,
|
|
@@ -62,51 +62,51 @@ const componentProps = {
|
|
|
62
62
|
checkable: true,
|
|
63
63
|
actions: [
|
|
64
64
|
{
|
|
65
|
-
label:
|
|
66
|
-
icon:
|
|
67
|
-
href:
|
|
65
|
+
label: "Open Google",
|
|
66
|
+
icon: "heroicons:link-20-solid",
|
|
67
|
+
href: "https://google.com",
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
label:
|
|
71
|
-
icon:
|
|
72
|
-
action: () => alert(
|
|
70
|
+
label: "Export",
|
|
71
|
+
icon: "heroicons:arrow-down-tray",
|
|
72
|
+
action: () => alert("export!"),
|
|
73
73
|
},
|
|
74
74
|
{ meta: { line: true } },
|
|
75
75
|
{
|
|
76
|
-
label:
|
|
77
|
-
icon:
|
|
78
|
-
action: () => alert(
|
|
79
|
-
color:
|
|
76
|
+
label: "Delete all",
|
|
77
|
+
icon: "heroicons:trash",
|
|
78
|
+
action: () => alert("Delete All!"),
|
|
79
|
+
color: "danger",
|
|
80
80
|
},
|
|
81
81
|
],
|
|
82
82
|
checkableActions: [
|
|
83
83
|
{
|
|
84
|
-
label:
|
|
84
|
+
label: "Delete all",
|
|
85
85
|
action: () => {
|
|
86
|
-
alert(
|
|
86
|
+
alert("delete!");
|
|
87
87
|
},
|
|
88
88
|
},
|
|
89
89
|
],
|
|
90
90
|
rowActions: [
|
|
91
91
|
{
|
|
92
|
-
label:
|
|
93
|
-
icon:
|
|
94
|
-
href: () =>
|
|
92
|
+
label: "Href",
|
|
93
|
+
icon: "heroicons:link-20-solid",
|
|
94
|
+
href: () => "https://google.com",
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
|
-
label:
|
|
98
|
-
icon:
|
|
97
|
+
label: "Action",
|
|
98
|
+
icon: "heroicons:arrow-right-20-solid",
|
|
99
99
|
action() {
|
|
100
|
-
alert(
|
|
100
|
+
alert("hit");
|
|
101
101
|
},
|
|
102
102
|
},
|
|
103
103
|
],
|
|
104
104
|
sections: [
|
|
105
105
|
{
|
|
106
|
-
name:
|
|
107
|
-
title:
|
|
108
|
-
icon:
|
|
109
|
-
closeText:
|
|
106
|
+
name: "test",
|
|
107
|
+
title: "Section Test",
|
|
108
|
+
icon: "heroicons:link",
|
|
109
|
+
closeText: "Close",
|
|
110
110
|
},
|
|
111
111
|
],
|
|
112
112
|
};
|
|
@@ -131,7 +131,14 @@ const templateSetup = (args) => {
|
|
|
131
131
|
lastFetch.value = new Date();
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
return {
|
|
134
|
+
return {
|
|
135
|
+
args,
|
|
136
|
+
onRowClick,
|
|
137
|
+
ownerIsVisible: true,
|
|
138
|
+
onFetch,
|
|
139
|
+
lastFetch,
|
|
140
|
+
DateTime,
|
|
141
|
+
};
|
|
135
142
|
};
|
|
136
143
|
|
|
137
144
|
const Template = (args) => ({
|
|
@@ -147,8 +154,8 @@ Demo.args = componentProps;
|
|
|
147
154
|
|
|
148
155
|
export const Small = Template.bind({});
|
|
149
156
|
Small.args = {
|
|
150
|
-
size:
|
|
151
|
-
}
|
|
157
|
+
size: "sm",
|
|
158
|
+
};
|
|
152
159
|
|
|
153
160
|
const VIfOnBaseTableColumn = (args) => ({
|
|
154
161
|
components: templateComponents,
|
|
@@ -231,25 +238,23 @@ Simple.args = {
|
|
|
231
238
|
const LocalTemplate = (args) => ({
|
|
232
239
|
components: templateComponents,
|
|
233
240
|
setup() {
|
|
234
|
-
|
|
235
241
|
const baseDataTableRef = ref(null);
|
|
236
242
|
|
|
237
243
|
const onCellClick = (...args) => {
|
|
238
|
-
alert(
|
|
244
|
+
alert("Cell clicked! View console log for details.");
|
|
239
245
|
console.log(JSON.parse(JSON.stringify(args)));
|
|
240
246
|
};
|
|
241
247
|
|
|
242
248
|
const filteredItems = computed(() => {
|
|
243
|
-
return optionsLarge
|
|
244
|
-
.filter
|
|
245
|
-
const type = baseDataTableRef.value?.query.filter?.type ?? '';
|
|
249
|
+
return optionsLarge.filter((item) => {
|
|
250
|
+
const type = baseDataTableRef.value?.query.filter?.type ?? "";
|
|
246
251
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
252
|
+
if (!type) {
|
|
253
|
+
return true;
|
|
254
|
+
}
|
|
250
255
|
|
|
251
|
-
|
|
252
|
-
|
|
256
|
+
return item.type === type;
|
|
257
|
+
});
|
|
253
258
|
});
|
|
254
259
|
|
|
255
260
|
return { args, filteredItems, baseDataTableRef, onCellClick };
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import BaseDatePicker from
|
|
2
|
-
import ShowValue from
|
|
3
|
-
import { DateTime } from
|
|
4
|
-
import { createFieldStory, sizes } from
|
|
1
|
+
import BaseDatePicker from "./BaseDatePicker.vue";
|
|
2
|
+
import ShowValue from "@/../.storybook/components/ShowValue.vue";
|
|
3
|
+
import { DateTime } from "luxon";
|
|
4
|
+
import { createFieldStory, sizes } from "../../.storybook/utils";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title:
|
|
7
|
+
title: "Form/BaseDatePicker",
|
|
8
8
|
component: BaseDatePicker,
|
|
9
9
|
argTypes: {
|
|
10
10
|
minDate: {
|
|
11
|
-
control: { type:
|
|
11
|
+
control: { type: "text" },
|
|
12
12
|
},
|
|
13
13
|
maxDate: {
|
|
14
|
-
control: { type:
|
|
14
|
+
control: { type: "text" },
|
|
15
15
|
},
|
|
16
16
|
mode: {
|
|
17
|
-
control: { type:
|
|
18
|
-
options: [
|
|
17
|
+
control: { type: "select" },
|
|
18
|
+
options: ["single", "multiple", "range", "time"],
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
21
|
-
control: { type:
|
|
21
|
+
control: { type: "select" },
|
|
22
22
|
options: sizes,
|
|
23
|
-
}
|
|
23
|
+
},
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
const Template = (args) => ({
|
|
28
28
|
components: { BaseDatePicker, ShowValue },
|
|
29
29
|
setup() {
|
|
30
|
-
const value = ref(
|
|
30
|
+
const value = ref("2022-01-01");
|
|
31
31
|
return { value, args };
|
|
32
32
|
},
|
|
33
33
|
template: `
|
|
@@ -41,12 +41,12 @@ export const Demo = Template.bind({});
|
|
|
41
41
|
|
|
42
42
|
export const MinDate = Template.bind({});
|
|
43
43
|
MinDate.args = {
|
|
44
|
-
minDate: DateTime.fromISO(
|
|
44
|
+
minDate: DateTime.fromISO("2023-01-05").toISODate(),
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export const MaxDate = Template.bind({});
|
|
48
48
|
MaxDate.args = {
|
|
49
|
-
maxDate:
|
|
49
|
+
maxDate: "2023-01-18",
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
export const Disabled = Template.bind({});
|
|
@@ -56,12 +56,12 @@ Disabled.args = {
|
|
|
56
56
|
|
|
57
57
|
export const Range = Template.bind({});
|
|
58
58
|
Range.args = {
|
|
59
|
-
mode:
|
|
59
|
+
mode: "range",
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
export const Multiple = Template.bind({});
|
|
63
63
|
Multiple.args = {
|
|
64
|
-
mode:
|
|
64
|
+
mode: "multiple",
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
export const DateAndTime = Template.bind({});
|
|
@@ -72,9 +72,9 @@ DateAndTime.args = {
|
|
|
72
72
|
export const DisableDates = Template.bind({});
|
|
73
73
|
DisableDates.args = {
|
|
74
74
|
disableDates: [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
"2023-01-12",
|
|
76
|
+
"2023-01-18",
|
|
77
|
+
"2023-01-24",
|
|
78
78
|
new Date(2023, 0, 16), // '2023-01-16'
|
|
79
79
|
],
|
|
80
80
|
};
|
|
@@ -82,12 +82,12 @@ DisableDates.args = {
|
|
|
82
82
|
const DisableMondayAndTuesdayTemplate = (args) => ({
|
|
83
83
|
components: { BaseDatePicker, ShowValue },
|
|
84
84
|
setup() {
|
|
85
|
-
const value = ref(
|
|
85
|
+
const value = ref("2022-01-03");
|
|
86
86
|
const disableDates = [
|
|
87
87
|
(date) => {
|
|
88
88
|
return date.getDay() == 1 || date.getDay() == 2;
|
|
89
|
-
}
|
|
90
|
-
]
|
|
89
|
+
},
|
|
90
|
+
];
|
|
91
91
|
return { value, args, disableDates };
|
|
92
92
|
},
|
|
93
93
|
template: `
|
|
@@ -103,12 +103,12 @@ export const RangeDisableDates = Template.bind({});
|
|
|
103
103
|
RangeDisableDates.args = {
|
|
104
104
|
disableDates: [
|
|
105
105
|
{
|
|
106
|
-
from:
|
|
107
|
-
to:
|
|
106
|
+
from: "2023-01-09",
|
|
107
|
+
to: "2023-01-15",
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
from:
|
|
111
|
-
to:
|
|
110
|
+
from: "2023-01-20",
|
|
111
|
+
to: "2023-01-25",
|
|
112
112
|
},
|
|
113
113
|
],
|
|
114
114
|
};
|
|
@@ -140,7 +140,7 @@ export const DateTimeConversion = (args) => {
|
|
|
140
140
|
};
|
|
141
141
|
};
|
|
142
142
|
DateTimeConversion.args = {
|
|
143
|
-
modelValue:
|
|
143
|
+
modelValue: "2023-01-05T00:00:00Z",
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
const TemplateSizes = (args) => ({
|
|
@@ -161,6 +161,6 @@ export const Sizes = TemplateSizes.bind({});
|
|
|
161
161
|
|
|
162
162
|
export const Field = createFieldStory({
|
|
163
163
|
component: BaseDatePicker,
|
|
164
|
-
componentName:
|
|
165
|
-
label:
|
|
164
|
+
componentName: "BaseDatePicker",
|
|
165
|
+
label: "Date",
|
|
166
166
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import BaseDateSelect from
|
|
2
|
-
import ShowValue from
|
|
3
|
-
import { createFieldStory, sizes } from
|
|
1
|
+
import BaseDateSelect from "./BaseDateSelect.vue";
|
|
2
|
+
import ShowValue from "@/../.storybook/components/ShowValue.vue";
|
|
3
|
+
import { createFieldStory, sizes } from "../../.storybook/utils";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title:
|
|
6
|
+
title: "Form/BaseDateSelect",
|
|
7
7
|
component: BaseDateSelect,
|
|
8
8
|
argTypes: {
|
|
9
9
|
size: {
|
|
10
|
-
control: { type:
|
|
10
|
+
control: { type: "select" },
|
|
11
11
|
options: sizes,
|
|
12
|
-
}
|
|
12
|
+
},
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -41,7 +41,7 @@ MaxYear.args = {
|
|
|
41
41
|
|
|
42
42
|
export const Disabled = Template.bind({});
|
|
43
43
|
Disabled.args = {
|
|
44
|
-
modelValue:
|
|
44
|
+
modelValue: "2022-11-16",
|
|
45
45
|
disabled: true,
|
|
46
46
|
};
|
|
47
47
|
|
|
@@ -63,6 +63,6 @@ export const Sizes = TemplateSizes.bind({});
|
|
|
63
63
|
|
|
64
64
|
export const Field = createFieldStory({
|
|
65
65
|
component: BaseDateSelect,
|
|
66
|
-
componentName:
|
|
67
|
-
label:
|
|
66
|
+
componentName: "BaseDateSelect",
|
|
67
|
+
label: "Date",
|
|
68
68
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import BaseBadge from
|
|
2
|
-
import BaseDescriptionList from
|
|
3
|
-
import BaseDescriptionListItem from
|
|
1
|
+
import BaseBadge from "./BaseBadge.vue";
|
|
2
|
+
import BaseDescriptionList from "./BaseDescriptionList.vue";
|
|
3
|
+
import BaseDescriptionListItem from "./BaseDescriptionListItem.vue";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
|
-
title:
|
|
6
|
+
title: "Data/BaseDescriptionList",
|
|
7
7
|
component: BaseDescriptionList,
|
|
8
8
|
argTypes: {},
|
|
9
9
|
};
|