layers-design-system 2.4.0 → 2.6.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.
- package/dist/layers-design-system.js +78505 -0
- package/dist/layers-design-system.umd.cjs +285 -0
- package/dist/style.css +1 -0
- package/package.json +26 -12
- package/.nvmrc +0 -1
- package/babel.config.js +0 -5
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -20
- package/src/assets/button-text-editor/double-quotes.svg +0 -4
- package/src/assets/button-text-editor/remove-formatting.svg +0 -5
- package/src/assets/button-text-editor/title.svg +0 -4
- package/src/assets/failed-to-load/failed-to-load.svg +0 -60
- package/src/assets/l-presentation/external-apps.png +0 -0
- package/src/assets/l-presentation/notification.png +0 -0
- package/src/assets/search-topics/empty-tags.svg +0 -59
- package/src/components/LAlert/docs.vue +0 -81
- package/src/components/LAlert/index.vue +0 -43
- package/src/components/LAttachmentChip/docs.vue +0 -84
- package/src/components/LAttachmentChip/index.vue +0 -179
- package/src/components/LBox/docs.vue +0 -26
- package/src/components/LBox/index.vue +0 -19
- package/src/components/LBoxHeader/index.vue +0 -24
- package/src/components/LBreadcrumb/docs.vue +0 -21
- package/src/components/LBreadcrumb/index.vue +0 -22
- package/src/components/LBreadcrumbItem/index.vue +0 -7
- package/src/components/LButton/docs.vue +0 -205
- package/src/components/LButton/index.vue +0 -369
- package/src/components/LButtonGroup/index.vue +0 -7
- package/src/components/LCarousel/docs.vue +0 -32
- package/src/components/LCarousel/index.vue +0 -88
- package/src/components/LCheckbox/docs.vue +0 -62
- package/src/components/LCheckbox/index.vue +0 -34
- package/src/components/LCheckboxButton/index.vue +0 -30
- package/src/components/LCheckboxGroup/index.vue +0 -53
- package/src/components/LChip/docs.vue +0 -113
- package/src/components/LChip/index.vue +0 -78
- package/src/components/LCircularLoader/docs.vue +0 -30
- package/src/components/LCircularLoader/index.vue +0 -97
- package/src/components/LCollapse/docs.vue +0 -68
- package/src/components/LCollapse/index.vue +0 -13
- package/src/components/LCollapseItem/index.vue +0 -28
- package/src/components/LDatePicker/docs.vue +0 -66
- package/src/components/LDatePicker/index.vue +0 -63
- package/src/components/LDialog/docs.vue +0 -36
- package/src/components/LDialog/index.vue +0 -37
- package/src/components/LDropdown/index.vue +0 -7
- package/src/components/LDropdownItem/index.vue +0 -13
- package/src/components/LDropdownMenu/docs.vue +0 -44
- package/src/components/LDropdownMenu/index.vue +0 -12
- package/src/components/LFailedToLoad/docs.vue +0 -37
- package/src/components/LFailedToLoad/index.vue +0 -61
- package/src/components/LForm/index.vue +0 -7
- package/src/components/LFormItem/index.vue +0 -12
- package/src/components/LHelperBox/assets/link.svg +0 -4
- package/src/components/LHelperBox/assets/open-envelope.svg +0 -9
- package/src/components/LHelperBox/docs.vue +0 -29
- package/src/components/LHelperBox/index.vue +0 -83
- package/src/components/LIcon/docs.vue +0 -174
- package/src/components/LIcon/index.vue +0 -55
- package/src/components/LImage/index.vue +0 -7
- package/src/components/LImageViewer/docs.vue +0 -111
- package/src/components/LImageViewer/index.vue +0 -449
- package/src/components/LInput/docs.vue +0 -43
- package/src/components/LInput/index.vue +0 -60
- package/src/components/LLinearProgress/docs.vue +0 -21
- package/src/components/LLinearProgress/index.vue +0 -74
- package/src/components/LNotice/docs.vue +0 -26
- package/src/components/LNotice/index.vue +0 -86
- package/src/components/LNotification/index.vue +0 -182
- package/src/components/LOption/index.vue +0 -7
- package/src/components/LOptionGroup/index.vue +0 -7
- package/src/components/LPresentation/docs.vue +0 -35
- package/src/components/LPresentation/index.vue +0 -182
- package/src/components/LProgress/index.vue +0 -7
- package/src/components/LPromptDialog/index.vue +0 -82
- package/src/components/LRadio/docs.vue +0 -54
- package/src/components/LRadio/index.vue +0 -13
- package/src/components/LRadioButton/index.vue +0 -30
- package/src/components/LRadioGroup/index.vue +0 -54
- package/src/components/LSearchBar/AddFilterButton.vue +0 -71
- package/src/components/LSearchBar/Filters/Editors/AmountEditor.vue +0 -110
- package/src/components/LSearchBar/Filters/Editors/DateEditor.vue +0 -146
- package/src/components/LSearchBar/Filters/Editors/NumberEditor.vue +0 -141
- package/src/components/LSearchBar/Filters/Editors/StringEditor.vue +0 -140
- package/src/components/LSearchBar/Filters/Editors/index.js +0 -16
- package/src/components/LSearchBar/Filters/FilterChip.vue +0 -105
- package/src/components/LSearchBar/Filters/Views/AmountView.vue +0 -28
- package/src/components/LSearchBar/Filters/Views/DateView.vue +0 -46
- package/src/components/LSearchBar/Filters/Views/NumberView.vue +0 -24
- package/src/components/LSearchBar/Filters/Views/StringView.vue +0 -47
- package/src/components/LSearchBar/Filters/Views/index.js +0 -16
- package/src/components/LSearchBar/docs.vue +0 -60
- package/src/components/LSearchBar/index.vue +0 -240
- package/src/components/LSearchTopics/RecentTermSearched.vue +0 -30
- package/src/components/LSearchTopics/TopicItem.vue +0 -346
- package/src/components/LSearchTopics/docs/drawer.vue +0 -254
- package/src/components/LSearchTopics/docs.vue +0 -60
- package/src/components/LSearchTopics/header.vue +0 -199
- package/src/components/LSearchTopics/helpers/showDialogConfirmation.js +0 -30
- package/src/components/LSearchTopics/helpers/showDiscardChangesDialog.js +0 -27
- package/src/components/LSearchTopics/index.vue +0 -750
- package/src/components/LSelect/docs.vue +0 -129
- package/src/components/LSelect/index.vue +0 -9
- package/src/components/LSlider/index.vue +0 -7
- package/src/components/LSwitch/docs.vue +0 -24
- package/src/components/LSwitch/index.vue +0 -60
- package/src/components/LTabPane/index.vue +0 -7
- package/src/components/LTable/FieldTypes/AmountView.vue +0 -16
- package/src/components/LTable/FieldTypes/DateView.vue +0 -18
- package/src/components/LTable/FieldTypes/EmailView.vue +0 -8
- package/src/components/LTable/FieldTypes/NumberView.vue +0 -13
- package/src/components/LTable/FieldTypes/PaymentStatusView.vue +0 -8
- package/src/components/LTable/FieldTypes/StringView.vue +0 -24
- package/src/components/LTable/FieldTypes/index.js +0 -18
- package/src/components/LTable/LTableBody.vue +0 -245
- package/src/components/LTable/LTableBodySpacer.vue +0 -17
- package/src/components/LTable/LTableEndspace.vue +0 -20
- package/src/components/LTable/LTableHeader.vue +0 -155
- package/src/components/LTable/LTableHeaderCell.vue +0 -188
- package/src/components/LTable/LTableHeaderLoader.vue +0 -62
- package/src/components/LTable/LTableHeaderResizer.vue +0 -162
- package/src/components/LTable/LTableLoadMore.vue +0 -56
- package/src/components/LTable/LTablePagination.vue +0 -174
- package/src/components/LTable/LTableReloader.vue +0 -61
- package/src/components/LTable/ListAdapter.js +0 -74
- package/src/components/LTable/docs.vue +0 -111
- package/src/components/LTable/helpers.js +0 -194
- package/src/components/LTable/index.vue +0 -961
- package/src/components/LTabs/docs.vue +0 -28
- package/src/components/LTabs/index.vue +0 -37
- package/src/components/LTargetChip/docs.vue +0 -86
- package/src/components/LTargetChip/index.vue +0 -64
- package/src/components/LTargetInput/docs.vue +0 -72
- package/src/components/LTargetInput/index.vue +0 -78
- package/src/components/LTextEditor/FloatingLink.vue +0 -91
- package/src/components/LTextEditor/LinkBox.vue +0 -94
- package/src/components/LTextEditor/docs.vue +0 -32
- package/src/components/LTextEditor/extensions/LayersBlockquote.js +0 -12
- package/src/components/LTextEditor/extensions/LayersBold.js +0 -11
- package/src/components/LTextEditor/extensions/LayersBreakLine.js +0 -16
- package/src/components/LTextEditor/extensions/LayersBubbleMenu.js +0 -10
- package/src/components/LTextEditor/extensions/LayersBulletList.js +0 -12
- package/src/components/LTextEditor/extensions/LayersHeading.js +0 -13
- package/src/components/LTextEditor/extensions/LayersHistory.js +0 -10
- package/src/components/LTextEditor/extensions/LayersItalic.js +0 -11
- package/src/components/LTextEditor/extensions/LayersLink.js +0 -29
- package/src/components/LTextEditor/extensions/LayersOrderedList.js +0 -12
- package/src/components/LTextEditor/extensions/LayersParagraph.js +0 -44
- package/src/components/LTextEditor/extensions/LayersPlaceholder.js +0 -11
- package/src/components/LTextEditor/extensions/LayersUnderline.js +0 -29
- package/src/components/LTextEditor/helpers/addProtocol.js +0 -5
- package/src/components/LTextEditor/helpers/removeEmptyTags.js +0 -5
- package/src/components/LTextEditor/index.vue +0 -421
- package/src/components/LTimeSelect/docs.vue +0 -41
- package/src/components/LTimeSelect/index.vue +0 -49
- package/src/components/LToggleButtonGroup/index.vue +0 -87
- package/src/components/LTooltip/docs.vue +0 -66
- package/src/components/LTooltip/index.vue +0 -28
- package/src/components/LTransitionExpand/docs.vue +0 -26
- package/src/components/LTransitionExpand/index.vue +0 -88
- package/src/components/LUpload/index.vue +0 -7
- package/src/docs/Colors.vue +0 -50
- package/src/docs/Home.vue +0 -11
- package/src/docs/Notifications.vue +0 -88
- package/src/docs/index.vue +0 -76
- package/src/docs/routes.js +0 -20
- package/src/helpers/Colors.js +0 -79
- package/src/helpers/FieldTypeComponents.js +0 -43
- package/src/helpers/Icons.js +0 -67
- package/src/helpers/Notification.js +0 -94
- package/src/helpers/PrettySize.js +0 -25
- package/src/helpers/RegisterElementUIComponents.js +0 -9
- package/src/helpers/Schemas.js +0 -18
- package/src/helpers/util.js +0 -15
- package/src/main-docs.js +0 -132
- package/src/main.js +0 -100
- package/src/style/colors.scss +0 -31
- package/src/style/element-variables.scss +0 -21
- package/src/style/icons.scss +0 -5
- package/src/style/layers-variables.scss +0 -73
- package/src/style/layout.scss +0 -2288
- package/src/style/main.scss +0 -11
- package/src/style/notifications.scss +0 -88
- package/src/style/transitions.scss +0 -43
- package/src/style/typography.scss +0 -155
- package/vue.config.js +0 -14
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<h1>Select</h1>
|
|
4
|
-
|
|
5
|
-
<div>
|
|
6
|
-
<h2>Basic</h2>
|
|
7
|
-
|
|
8
|
-
<l-select v-model="value" placeholder="Select">
|
|
9
|
-
<l-option
|
|
10
|
-
v-for="item in options"
|
|
11
|
-
:key="item.value"
|
|
12
|
-
:label="item.label"
|
|
13
|
-
:value="item.value"
|
|
14
|
-
></l-option>
|
|
15
|
-
</l-select>
|
|
16
|
-
<br />
|
|
17
|
-
<l-select v-model="value" placeholder="Select" disabled>
|
|
18
|
-
<l-option
|
|
19
|
-
v-for="item in options"
|
|
20
|
-
:key="item.value"
|
|
21
|
-
:label="item.label"
|
|
22
|
-
:value="item.value"
|
|
23
|
-
></l-option>
|
|
24
|
-
</l-select>
|
|
25
|
-
<br />
|
|
26
|
-
<l-select v-model="value1" multiple placeholder="Select">
|
|
27
|
-
<l-option
|
|
28
|
-
v-for="item in options"
|
|
29
|
-
:key="item.value"
|
|
30
|
-
:label="item.label"
|
|
31
|
-
:value="item.value"
|
|
32
|
-
></l-option>
|
|
33
|
-
</l-select>
|
|
34
|
-
<br />
|
|
35
|
-
<l-select
|
|
36
|
-
v-model="value1"
|
|
37
|
-
multiple
|
|
38
|
-
collapse-tags
|
|
39
|
-
placeholder="Select"
|
|
40
|
-
>
|
|
41
|
-
<l-option
|
|
42
|
-
v-for="item in options"
|
|
43
|
-
:key="item.value"
|
|
44
|
-
:label="item.label"
|
|
45
|
-
:value="item.value"
|
|
46
|
-
></l-option>
|
|
47
|
-
</l-select>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<div>
|
|
51
|
-
<h2>Original (from Element UI)</h2>
|
|
52
|
-
|
|
53
|
-
<el-select v-model="value" placeholder="Select">
|
|
54
|
-
<el-option
|
|
55
|
-
v-for="item in options"
|
|
56
|
-
:key="item.value"
|
|
57
|
-
:label="item.label"
|
|
58
|
-
:value="item.value"
|
|
59
|
-
></el-option>
|
|
60
|
-
</el-select>
|
|
61
|
-
<br />
|
|
62
|
-
<el-select v-model="value" placeholder="Select" disabled>
|
|
63
|
-
<el-option
|
|
64
|
-
v-for="item in options"
|
|
65
|
-
:key="item.value"
|
|
66
|
-
:label="item.label"
|
|
67
|
-
:value="item.value"
|
|
68
|
-
></el-option>
|
|
69
|
-
</el-select>
|
|
70
|
-
<br />
|
|
71
|
-
<el-select v-model="value1" multiple placeholder="Select">
|
|
72
|
-
<el-option
|
|
73
|
-
v-for="item in options"
|
|
74
|
-
:key="item.value"
|
|
75
|
-
:label="item.label"
|
|
76
|
-
:value="item.value"
|
|
77
|
-
></el-option>
|
|
78
|
-
</el-select>
|
|
79
|
-
<br />
|
|
80
|
-
<el-select
|
|
81
|
-
v-model="value1"
|
|
82
|
-
multiple
|
|
83
|
-
collapse-tags
|
|
84
|
-
placeholder="Select"
|
|
85
|
-
>
|
|
86
|
-
<el-option
|
|
87
|
-
v-for="item in options"
|
|
88
|
-
:key="item.value"
|
|
89
|
-
:label="item.label"
|
|
90
|
-
:value="item.value"
|
|
91
|
-
></el-option>
|
|
92
|
-
</el-select>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</template>
|
|
96
|
-
|
|
97
|
-
<script>
|
|
98
|
-
export default {
|
|
99
|
-
name: "Select",
|
|
100
|
-
data() {
|
|
101
|
-
return {
|
|
102
|
-
options: [
|
|
103
|
-
{
|
|
104
|
-
value: "Option1",
|
|
105
|
-
label: "Option1"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
value: "Option2",
|
|
109
|
-
label: "Option2"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
value: "Option3",
|
|
113
|
-
label: "Option3"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
value: "Option4",
|
|
117
|
-
label: "Option4"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
value: "Option5",
|
|
121
|
-
label: "Option5"
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
value: "",
|
|
125
|
-
value1: [],
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
</script>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<h1>Switch</h1>
|
|
4
|
-
|
|
5
|
-
<div>
|
|
6
|
-
<h2>Basic</h2>
|
|
7
|
-
<l-switch v-model="value1" />
|
|
8
|
-
<br /><br />
|
|
9
|
-
<l-switch v-model="value2" :width="60" :active-icon-class="value2 ? 'uil-check' : 'uil-times'" />
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
export default {
|
|
16
|
-
name: "Switch",
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
value1: false,
|
|
20
|
-
value2: false,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
</script>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import clone from "lodash/clone";
|
|
3
|
-
import { Switch } from 'element-ui';
|
|
4
|
-
|
|
5
|
-
const Base = clone(Switch);
|
|
6
|
-
delete Base.props.activeIconClass;
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
tagName: 'l-switch',
|
|
10
|
-
extends: Switch,
|
|
11
|
-
computed: {
|
|
12
|
-
activeIconClass() {
|
|
13
|
-
return this.value ? 'uil-check' : 'uil-times'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
</script>
|
|
18
|
-
<style scoped>
|
|
19
|
-
.l-switch,
|
|
20
|
-
.l-switch .el-switch__core {
|
|
21
|
-
height: 24px;
|
|
22
|
-
}
|
|
23
|
-
.l-switch .el-switch__core {
|
|
24
|
-
border-radius: 40px;
|
|
25
|
-
border: none;
|
|
26
|
-
background: var(--color-gray-60);
|
|
27
|
-
}
|
|
28
|
-
.l-switch.el-switch.is-checked .el-switch__core::after {
|
|
29
|
-
left: 100%;
|
|
30
|
-
margin-left: -24px;
|
|
31
|
-
border: 1px solid var(--color-aqua);
|
|
32
|
-
}
|
|
33
|
-
.l-switch .el-switch__core:after {
|
|
34
|
-
width: 22px;
|
|
35
|
-
height: 22px;
|
|
36
|
-
top: 0px;
|
|
37
|
-
left: 0px;
|
|
38
|
-
border: 1px solid var(--color-gray-60);
|
|
39
|
-
box-sizing: initial;
|
|
40
|
-
}
|
|
41
|
-
.l-switch .el-switch__label.el-switch__label--right {
|
|
42
|
-
left: 0px;
|
|
43
|
-
position: absolute;
|
|
44
|
-
margin: 0px;
|
|
45
|
-
width: 24px;
|
|
46
|
-
height: 24px;
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
justify-content: center;
|
|
50
|
-
color: var(--color-gray-60);
|
|
51
|
-
}
|
|
52
|
-
.l-switch .el-switch__label.el-switch__label--right > i {
|
|
53
|
-
font-size: 18px;
|
|
54
|
-
}
|
|
55
|
-
.l-switch .el-switch__label.el-switch__label--right.is-active{
|
|
56
|
-
left: 100%;
|
|
57
|
-
margin-left: -24px;
|
|
58
|
-
color: var(--color-aqua);
|
|
59
|
-
}
|
|
60
|
-
</style>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<template functional>
|
|
2
|
-
<span>{{ $options.methods.formatValue(props.value, parent) }}</span>
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
export default {
|
|
6
|
-
props: ["value", "schema"],
|
|
7
|
-
methods: {
|
|
8
|
-
formatValue(value, parent) {
|
|
9
|
-
if (isNaN(value) || value === null || value === undefined) return "-"
|
|
10
|
-
if (parent.$n) return parent.$n(value / 100, 'currency')
|
|
11
|
-
return Number(value / 100).toLocaleString('pt-BR', {style: 'currency', currency: 'BRL'})
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
</script>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<template functional>
|
|
2
|
-
<span>{{ $options.methods.formatValue(props.value, props.schema) }}</span>
|
|
3
|
-
</template>
|
|
4
|
-
<script>
|
|
5
|
-
import get from "lodash/get";
|
|
6
|
-
import dayjs from "dayjs"
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
props: ["value", "schema"],
|
|
10
|
-
methods: {
|
|
11
|
-
formatValue(value, schema) {
|
|
12
|
-
if (!value) return "-"
|
|
13
|
-
const format = get(schema, 'options.format', 'dd/MM/yyyy hh:mm:ss')
|
|
14
|
-
return dayjs(value, { locale: 'pt-br' }).format(format)
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
</script>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<template functional>
|
|
2
|
-
<router-link
|
|
3
|
-
v-if="$options.methods.hasRouterLink(props)"
|
|
4
|
-
:to="$options.methods.getRouterLink(props)"
|
|
5
|
-
>{{ props.value }}</router-link>
|
|
6
|
-
<span v-else>{{ props.value }}</span>
|
|
7
|
-
</template>
|
|
8
|
-
<script>
|
|
9
|
-
import get from "lodash/get";
|
|
10
|
-
import Mustache from "mustache";
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
props: ["value", "schema", "entity"],
|
|
14
|
-
methods: {
|
|
15
|
-
hasRouterLink(props) {
|
|
16
|
-
return get(props.schema, "options.routerLink");
|
|
17
|
-
},
|
|
18
|
-
getRouterLink(props) {
|
|
19
|
-
const template = get(props.schema, "options.routerLink");
|
|
20
|
-
return Mustache.render(template, props.entity);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
</script>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import StringView from "./StringView.vue";
|
|
2
|
-
import NumberView from "./NumberView.vue";
|
|
3
|
-
import AmountView from "./AmountView.vue";
|
|
4
|
-
import EmailView from "./EmailView.vue";
|
|
5
|
-
import DateView from "./DateView.vue";
|
|
6
|
-
|
|
7
|
-
import { FieldTypeComponents } from '../../../helpers/FieldTypeComponents'
|
|
8
|
-
|
|
9
|
-
const FieldTypes = {}
|
|
10
|
-
FieldTypes.register = function () {
|
|
11
|
-
FieldTypeComponents.register({ type: 'String' }, 'default', StringView);
|
|
12
|
-
FieldTypeComponents.register({ type: 'Date' }, 'default', DateView);
|
|
13
|
-
FieldTypeComponents.register({ type: 'Number' }, 'default', NumberView);
|
|
14
|
-
|
|
15
|
-
FieldTypeComponents.register({ format: 'Amount' }, 'default', AmountView);
|
|
16
|
-
FieldTypeComponents.register({ format: 'Email' }, 'default', EmailView);
|
|
17
|
-
}
|
|
18
|
-
export default FieldTypes
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<tbody class="l-table-tbody">
|
|
3
|
-
<template v-if="page && page.loaded">
|
|
4
|
-
<tr
|
|
5
|
-
v-for="(item, index) in page.data"
|
|
6
|
-
:key="index"
|
|
7
|
-
:class="{'l-table-selected': checked[index]}"
|
|
8
|
-
>
|
|
9
|
-
<td v-if="selectable" key="selector" class="l-table-cell l-table-column-selector">
|
|
10
|
-
<l-checkbox
|
|
11
|
-
class="l-table-selector"
|
|
12
|
-
:type="multiselect ? 'checkbox' : 'radio'"
|
|
13
|
-
:value="checked[index]"
|
|
14
|
-
@change="$emit('selected', {key: item.id, selected: $event})"
|
|
15
|
-
/>
|
|
16
|
-
</td>
|
|
17
|
-
<td
|
|
18
|
-
v-for="(columnSpec, idx) in columnSpecs"
|
|
19
|
-
:key="idx"
|
|
20
|
-
class="l-table-cell"
|
|
21
|
-
:class="`align-${columnSpec.align}${clickable? ' cursor-pointer' : ''}`"
|
|
22
|
-
@click="$emit('click-item', item)"
|
|
23
|
-
>
|
|
24
|
-
<component
|
|
25
|
-
:is="getColumnComponent(columnSpec)"
|
|
26
|
-
:value="getColumnValue(item, columnSpec)"
|
|
27
|
-
:schema="columnSpec"
|
|
28
|
-
:entity="item"
|
|
29
|
-
/>
|
|
30
|
-
</td>
|
|
31
|
-
</tr>
|
|
32
|
-
</template>
|
|
33
|
-
<template v-else-if="page && page.loading">
|
|
34
|
-
<tr
|
|
35
|
-
v-for="(item, index) in estimatedRows"
|
|
36
|
-
:key="index">
|
|
37
|
-
<td v-if="selectable" key="selector" class="l-table-cell l-table-column-selector">
|
|
38
|
-
<l-checkbox
|
|
39
|
-
disabled
|
|
40
|
-
class="l-table-selector"
|
|
41
|
-
:type="multiselect ? 'checkbox' : 'radio'"
|
|
42
|
-
:value="includedAll"
|
|
43
|
-
/>
|
|
44
|
-
</td>
|
|
45
|
-
<td
|
|
46
|
-
v-for="(columnSpec, idx) in columnSpecs"
|
|
47
|
-
:key="idx"
|
|
48
|
-
class="l-table-cell"
|
|
49
|
-
:class="`align-${columnSpec.align}`">
|
|
50
|
-
<span class="l-table-skeleton"></span>
|
|
51
|
-
</td>
|
|
52
|
-
</tr>
|
|
53
|
-
</template>
|
|
54
|
-
<template v-else>
|
|
55
|
-
<tr
|
|
56
|
-
v-for="(item, index) in estimatedRows"
|
|
57
|
-
:key="index">
|
|
58
|
-
<td v-if="selectable" key="selector" class="l-table-cell l-table-column-selector">
|
|
59
|
-
<l-checkbox
|
|
60
|
-
disabled
|
|
61
|
-
class="l-table-selector"
|
|
62
|
-
:type="multiselect ? 'checkbox' : 'radio'"
|
|
63
|
-
:value="includedAll"
|
|
64
|
-
/>
|
|
65
|
-
</td>
|
|
66
|
-
<td
|
|
67
|
-
v-for="(columnSpec, idx) in columnSpecs"
|
|
68
|
-
:key="idx"
|
|
69
|
-
class="l-table-cell"
|
|
70
|
-
:class="`align-${columnSpec.align}`">
|
|
71
|
-
<span class="l-table-skeleton error"></span>
|
|
72
|
-
</td>
|
|
73
|
-
</tr>
|
|
74
|
-
</template>
|
|
75
|
-
</tbody>
|
|
76
|
-
</template>
|
|
77
|
-
|
|
78
|
-
<script>
|
|
79
|
-
import get from "lodash/get";
|
|
80
|
-
|
|
81
|
-
export default {
|
|
82
|
-
props: {
|
|
83
|
-
perPage: Number,
|
|
84
|
-
pagesCount: Number,
|
|
85
|
-
totalCount: Number,
|
|
86
|
-
|
|
87
|
-
columnSpecs: {
|
|
88
|
-
type: Array
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
includedIds: {
|
|
92
|
-
type: Array
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
excludedIds: {
|
|
96
|
-
type: Array
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
selectable: Boolean,
|
|
100
|
-
clickable: Boolean,
|
|
101
|
-
multiselect: Boolean,
|
|
102
|
-
page: Object
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
computed: {
|
|
106
|
-
includedAll() {
|
|
107
|
-
return this.includedIds.toString() === "*";
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
estimatedRows() {
|
|
111
|
-
if (this.page && this.pagesCount > 1 && this.page.index >= this.pagesCount - 1) {
|
|
112
|
-
return this.totalCount % this.perPage
|
|
113
|
-
}
|
|
114
|
-
return this.perPage
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
checked() {
|
|
118
|
-
if (!this.page || !this.page.data) return [];
|
|
119
|
-
|
|
120
|
-
let includedIds = this.includedIds;
|
|
121
|
-
let excludedIds = this.excludedIds;
|
|
122
|
-
let includedAll = this.includedAll;
|
|
123
|
-
return this.page.data.map(
|
|
124
|
-
item =>
|
|
125
|
-
(includedAll && !excludedIds.includes(item.id)) ||
|
|
126
|
-
includedIds.includes(item.id)
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
methods: {
|
|
132
|
-
getColumnComponent(columnSpec) {
|
|
133
|
-
return columnSpec.component;
|
|
134
|
-
},
|
|
135
|
-
getColumnValue(item, columnSpec) {
|
|
136
|
-
return get(item, columnSpec.path);
|
|
137
|
-
},
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
</script>
|
|
141
|
-
|
|
142
|
-
<style>
|
|
143
|
-
.cursor-pointer {
|
|
144
|
-
cursor: pointer
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.l-table-tbody {
|
|
148
|
-
border-spacing: 0;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.l-table-tbody > tr {
|
|
152
|
-
background-color: var(--l-table-bg-color);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.l-table-tbody > tr:hover {
|
|
156
|
-
background-color: var(--l-table-row-hover-color);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.l-table-tbody > tr.l-table-selected {
|
|
160
|
-
background-color: var(--l-table-row-selected-color);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.l-table-tbody > tr.l-table-selected:hover {
|
|
164
|
-
background-color: var(--l-table-row-selected-hover-color);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/* Skeleton for table */
|
|
168
|
-
.l-table-skeleton {
|
|
169
|
-
display: block;
|
|
170
|
-
margin-right: 30px;
|
|
171
|
-
margin-top: 2px;
|
|
172
|
-
border-radius: 2px;
|
|
173
|
-
height: var(--l-table-skeleton-height);
|
|
174
|
-
background-color: var(--color-gray-20);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.l-table-skeleton.error {
|
|
178
|
-
background-color: var(--color-danger-light) !important;
|
|
179
|
-
animation: none !important;
|
|
180
|
-
background-image: none !important;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
@keyframes lTableSkeletonShimmer {
|
|
184
|
-
0%{ background-position: 50% 0; }
|
|
185
|
-
100%{ background-position: -50% 0; }
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.l-table-tbody > tr:first-child .l-table-skeleton{
|
|
189
|
-
animation-duration: 1.2s;
|
|
190
|
-
animation-fill-mode: forwards;
|
|
191
|
-
animation-iteration-count: 10;
|
|
192
|
-
animation-timing-function: linear;
|
|
193
|
-
animation-delay: 500ms;
|
|
194
|
-
animation-name: lTableSkeletonShimmer;
|
|
195
|
-
background-image: linear-gradient(to right, var(--color-gray-20) 8%, var(--color-gray-40) 18%, var(--color-gray-20) 33%);
|
|
196
|
-
background-size: 400px 100%;
|
|
197
|
-
background-position: 50% 0;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* Cell styling */
|
|
201
|
-
.l-table-tbody > tr > .l-table-cell {
|
|
202
|
-
padding: var(--l-table-cell-padding);
|
|
203
|
-
|
|
204
|
-
white-space: nowrap;
|
|
205
|
-
text-overflow: ellipsis;
|
|
206
|
-
box-sizing: border-box;
|
|
207
|
-
|
|
208
|
-
border-top: var(--l-table-border-tick) solid var(--l-table-border-color);
|
|
209
|
-
|
|
210
|
-
height: var(--l-table-row-height);
|
|
211
|
-
max-height: var(--l-table-row-height);
|
|
212
|
-
min-height: var(--l-table-row-height);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.l-table-cell.align-left {
|
|
216
|
-
text-align: left;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.l-table-cell.align-right {
|
|
220
|
-
text-align: right;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.l-table-cell.align-center {
|
|
224
|
-
text-align: center;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/* Selector styling */
|
|
228
|
-
.l-table-tbody > tr > .l-table-column-selector > input {
|
|
229
|
-
opacity: 0.4;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.l-table-tbody > tr:hover > .l-table-column-selector > input,
|
|
233
|
-
.l-table-tbody > tr.l-table-selected > .l-table-column-selector > input {
|
|
234
|
-
opacity: 1;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/* Error handeling */
|
|
238
|
-
.l-table-error-cell {
|
|
239
|
-
padding: var(--l-table-cell-padding);
|
|
240
|
-
border-top: var(--l-table-border-tick) solid var(--l-table-border-color);
|
|
241
|
-
height: var(--l-table-row-height);
|
|
242
|
-
max-height: var(--l-table-row-height);
|
|
243
|
-
min-height: var(--l-table-row-height);
|
|
244
|
-
}
|
|
245
|
-
</style>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<template functional>
|
|
2
|
-
<tbody class="l-table-spacer">
|
|
3
|
-
<tr :style="{height: `${props.height}px`}">
|
|
4
|
-
<td class="l-table-spacer-bg" colspan="999"/>
|
|
5
|
-
</tr>
|
|
6
|
-
</tbody>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<style>
|
|
10
|
-
/* Create fake lines on spacers */
|
|
11
|
-
.l-table-spacer-bg {
|
|
12
|
-
background-image: linear-gradient(var(--l-table-border-color) 1px, 1px, transparent calc(var(--l-table-row-height) - 1px));
|
|
13
|
-
background-size: 100% var(--l-table-row-height);
|
|
14
|
-
background-position: 0px 0px;
|
|
15
|
-
background-repeat: repeat-y;
|
|
16
|
-
}
|
|
17
|
-
</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<template functional>
|
|
2
|
-
<div class="l-table-endspace"/>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<style>
|
|
6
|
-
/* Final spacer for paged mode */
|
|
7
|
-
.l-table-endspace {
|
|
8
|
-
position: sticky;
|
|
9
|
-
left: 0;
|
|
10
|
-
right: 0;
|
|
11
|
-
flex: 1;
|
|
12
|
-
background: var(--l-table-endspace-bg-color);
|
|
13
|
-
/* border-top: var(--l-table-border-tick) solid var(--l-table-border-color); */
|
|
14
|
-
background-image: linear-gradient(var(--l-table-border-color) 1px, 1px, transparent calc(var(--l-table-row-height) - 1px));
|
|
15
|
-
background-size: 100% var(--l-table-row-height);
|
|
16
|
-
background-position: 0px 0px;
|
|
17
|
-
background-repeat: no-repeat;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
</style>
|