layers-design-system 2.3.0 → 2.5.1
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 +78496 -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/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 -101
- 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
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/index.html +0 -0
package/src/helpers/Icons.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
const CUSTOM_ICONS = {
|
|
2
|
-
"type:String": "uil-text",
|
|
3
|
-
"type:Number": "uil-star",
|
|
4
|
-
"type:Date": "uil-calender",
|
|
5
|
-
|
|
6
|
-
"format:Email": "uil-at",
|
|
7
|
-
"format:Amount": "uil-usd-circle",
|
|
8
|
-
"format:PaymentStatus": "uil-bolt-alt",
|
|
9
|
-
|
|
10
|
-
"amount": "uil-usd-circle",
|
|
11
|
-
"recurrence": "uil-repeat",
|
|
12
|
-
"date": "uil-calender",
|
|
13
|
-
"user": "uil-user-circle",
|
|
14
|
-
"email": "uil-at",
|
|
15
|
-
"key": "uil-key-skeleton"
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
function get(key) {
|
|
19
|
-
if (!key) {
|
|
20
|
-
return null
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (key.icon) {
|
|
24
|
-
key = key.icon
|
|
25
|
-
}
|
|
26
|
-
else if (key.format) {
|
|
27
|
-
key = `format:${key.format}`
|
|
28
|
-
}
|
|
29
|
-
else if (key.type) {
|
|
30
|
-
key = `type:${key.type}`
|
|
31
|
-
}
|
|
32
|
-
if (key in CUSTOM_ICONS) {
|
|
33
|
-
key = CUSTOM_ICONS[key];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return key;
|
|
37
|
-
}
|
|
38
|
-
function register(key, className) {
|
|
39
|
-
CUSTOM_ICONS[key] = className
|
|
40
|
-
}
|
|
41
|
-
function registerForType(type, className) {
|
|
42
|
-
CUSTOM_ICONS[`type:${type}`] = className
|
|
43
|
-
}
|
|
44
|
-
function registerForFormat(format, className) {
|
|
45
|
-
CUSTOM_ICONS[`format:${format}`] = className
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const Plugin = {};
|
|
49
|
-
Plugin.install = function (Vue) {
|
|
50
|
-
Vue.prototype.$L.Icons = {
|
|
51
|
-
get,
|
|
52
|
-
register,
|
|
53
|
-
registerForType,
|
|
54
|
-
registerForFormat
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Vue.mixin({
|
|
58
|
-
// beforeCreate() {
|
|
59
|
-
// window['console'].log('beforeCreate', this)
|
|
60
|
-
// if (this.$options && this.$options.propsData && this.$options.propsData.icon) {
|
|
61
|
-
// this.$options.propsData.icon = get(this.$options.propsData.icon)
|
|
62
|
-
// }
|
|
63
|
-
// }
|
|
64
|
-
// })
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export default Plugin;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import Main from '../components/LNotification/index.vue';
|
|
3
|
-
import merge from 'element-ui/src/utils/merge';
|
|
4
|
-
import { PopupManager } from 'element-ui/src/utils/popup';
|
|
5
|
-
import { isVNode } from 'element-ui/src/utils/vdom';
|
|
6
|
-
const NotificationConstructor = Vue.extend(Main);
|
|
7
|
-
|
|
8
|
-
let instance;
|
|
9
|
-
let instances = [];
|
|
10
|
-
let seed = 1;
|
|
11
|
-
|
|
12
|
-
const Notification = function(options) {
|
|
13
|
-
if (Vue.prototype.$isServer) return;
|
|
14
|
-
options = merge({}, options);
|
|
15
|
-
const userOnClose = options.onClose;
|
|
16
|
-
const id = 'notification_' + seed++;
|
|
17
|
-
const position = options.position || 'top-right';
|
|
18
|
-
|
|
19
|
-
options.onClose = function() {
|
|
20
|
-
Notification.close(id, userOnClose);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
instance = new NotificationConstructor({
|
|
24
|
-
data: options
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
if (isVNode(options.message)) {
|
|
28
|
-
instance.$slots.default = [options.message];
|
|
29
|
-
options.message = 'REPLACED_BY_VNODE';
|
|
30
|
-
}
|
|
31
|
-
instance.id = id;
|
|
32
|
-
instance.$mount();
|
|
33
|
-
document.body.appendChild(instance.$el);
|
|
34
|
-
instance.visible = true;
|
|
35
|
-
instance.dom = instance.$el;
|
|
36
|
-
instance.dom.style.zIndex = PopupManager.nextZIndex();
|
|
37
|
-
|
|
38
|
-
let verticalOffset = options.offset || 0;
|
|
39
|
-
instances.filter(item => item.position === position).forEach(item => {
|
|
40
|
-
verticalOffset += item.$el.offsetHeight + 16;
|
|
41
|
-
});
|
|
42
|
-
verticalOffset += 16;
|
|
43
|
-
instance.verticalOffset = verticalOffset;
|
|
44
|
-
instances.push(instance);
|
|
45
|
-
return instance;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
['success', 'warning', 'info', 'error'].forEach(type => {
|
|
49
|
-
Notification[type] = options => {
|
|
50
|
-
if (typeof options === 'string' || isVNode(options)) {
|
|
51
|
-
options = {
|
|
52
|
-
message: options
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
options.type = type;
|
|
56
|
-
return Notification(options);
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
Notification.close = function(id, userOnClose) {
|
|
61
|
-
let index = -1;
|
|
62
|
-
const len = instances.length;
|
|
63
|
-
const instance = instances.filter((instance, i) => {
|
|
64
|
-
if (instance.id === id) {
|
|
65
|
-
index = i;
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
return false;
|
|
69
|
-
})[0];
|
|
70
|
-
if (!instance) return;
|
|
71
|
-
|
|
72
|
-
if (typeof userOnClose === 'function') {
|
|
73
|
-
userOnClose(instance);
|
|
74
|
-
}
|
|
75
|
-
instances.splice(index, 1);
|
|
76
|
-
|
|
77
|
-
if (len <= 1) return;
|
|
78
|
-
const position = instance.position;
|
|
79
|
-
const removedHeight = instance.dom.offsetHeight;
|
|
80
|
-
for (let i = index; i < len - 1 ; i++) {
|
|
81
|
-
if (instances[i].position === position) {
|
|
82
|
-
instances[i].dom.style[instance.verticalProperty] =
|
|
83
|
-
parseInt(instances[i].dom.style[instance.verticalProperty], 10) - removedHeight - 16 + 'px';
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
Notification.closeAll = function() {
|
|
89
|
-
for (let i = instances.length - 1; i >= 0; i--) {
|
|
90
|
-
instances[i].close();
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export default Notification;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Source: https://stackoverflow.com/a/14919494
|
|
3
|
-
*
|
|
4
|
-
* Returns a pretty form of "size" to show in UI. Examples:
|
|
5
|
-
* 10 => '10B'
|
|
6
|
-
* 1024 => '10KB'
|
|
7
|
-
*/
|
|
8
|
-
export default function PrettySize(bytes) {
|
|
9
|
-
if (!bytes) return '';
|
|
10
|
-
|
|
11
|
-
var si = true
|
|
12
|
-
var thresh = si ? 1000 : 1024;
|
|
13
|
-
if(Math.abs(bytes) < thresh) {
|
|
14
|
-
return bytes + ' B';
|
|
15
|
-
}
|
|
16
|
-
var units = si
|
|
17
|
-
? ['kb','MB','GB','TB','PB','EB','ZB','YB']
|
|
18
|
-
: ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];
|
|
19
|
-
var u = -1;
|
|
20
|
-
do {
|
|
21
|
-
bytes /= thresh;
|
|
22
|
-
++u;
|
|
23
|
-
} while(Math.abs(bytes) >= thresh && u < units.length - 1);
|
|
24
|
-
return bytes.toFixed(1)+' '+units[u];
|
|
25
|
-
}
|
package/src/helpers/Schemas.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const SCHEMAS = new Map();
|
|
2
|
-
|
|
3
|
-
function getSchema(key) {
|
|
4
|
-
return SCHEMAS.get(key);
|
|
5
|
-
}
|
|
6
|
-
function registerSchema(key, schema) {
|
|
7
|
-
SCHEMAS.set(key, schema);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const Plugin = {};
|
|
11
|
-
Plugin.install = function (Vue) {
|
|
12
|
-
Vue.prototype.$L.Schemas = {
|
|
13
|
-
get: getSchema,
|
|
14
|
-
register: registerSchema,
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default Plugin;
|
package/src/helpers/util.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export function buildFieldKeys(fieldSchema) {
|
|
2
|
-
const keys = []
|
|
3
|
-
if (fieldSchema && fieldSchema.format) {
|
|
4
|
-
keys.push(`format:${fieldSchema.format}`)
|
|
5
|
-
}
|
|
6
|
-
if (fieldSchema && fieldSchema.type) {
|
|
7
|
-
keys.push(`type:${fieldSchema.type}`)
|
|
8
|
-
}
|
|
9
|
-
keys.push('DEFAULT')
|
|
10
|
-
|
|
11
|
-
if (keys.length === 0) {
|
|
12
|
-
throw new Error(`Unprocessable fieldSchema ${fieldSchema}`)
|
|
13
|
-
}
|
|
14
|
-
return keys
|
|
15
|
-
}
|
package/src/main-docs.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
|
|
3
|
-
import Element from 'element-ui'
|
|
4
|
-
import './style/element-variables.scss'
|
|
5
|
-
import locale from 'element-ui/lib/locale/lang/pt-br'
|
|
6
|
-
Vue.use(Element, { locale })
|
|
7
|
-
|
|
8
|
-
import LayersDesignSystem from './main.js'
|
|
9
|
-
Vue.use(LayersDesignSystem)
|
|
10
|
-
window.$L = Vue.prototype.$L
|
|
11
|
-
|
|
12
|
-
import VueModals from '@tenda.digital/vue-modals'
|
|
13
|
-
import '@tenda.digital/vue-modals/dist/vue-modals.css'
|
|
14
|
-
Vue.use(VueModals)
|
|
15
|
-
|
|
16
|
-
import VueRouter from 'vue-router'
|
|
17
|
-
Vue.use(VueRouter)
|
|
18
|
-
|
|
19
|
-
const PayableSchema = {
|
|
20
|
-
title: 'Cobranças',
|
|
21
|
-
description: '',
|
|
22
|
-
collection: 'payables',
|
|
23
|
-
url: 'https://api.layers.digital/v1/payments/payables',
|
|
24
|
-
fields: [
|
|
25
|
-
{
|
|
26
|
-
title: 'Código da Cobrança',
|
|
27
|
-
description: 'Identificador único da cobrança',
|
|
28
|
-
reason: '',
|
|
29
|
-
path: 'code',
|
|
30
|
-
type: 'String',
|
|
31
|
-
options: {
|
|
32
|
-
routerLink: '/payments/payables/{{ id }}',
|
|
33
|
-
},
|
|
34
|
-
sortable: false,
|
|
35
|
-
displayable: true,
|
|
36
|
-
filterable: true,
|
|
37
|
-
editable: false,
|
|
38
|
-
icon: 'key',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
title: 'Data da Cobrança',
|
|
42
|
-
description: 'Data de vencimento da cobrança',
|
|
43
|
-
reason: '',
|
|
44
|
-
path: 'dueAt',
|
|
45
|
-
type: 'Date',
|
|
46
|
-
options: {
|
|
47
|
-
format: 'LL',
|
|
48
|
-
},
|
|
49
|
-
sortable: true,
|
|
50
|
-
displayable: true,
|
|
51
|
-
filterable: true,
|
|
52
|
-
editable: true,
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
title: 'Cliente',
|
|
56
|
-
description: 'Nome de quem fez a compra',
|
|
57
|
-
reason: '',
|
|
58
|
-
path: 'customer.name',
|
|
59
|
-
type: 'String',
|
|
60
|
-
options: null,
|
|
61
|
-
sortable: true,
|
|
62
|
-
displayable: true,
|
|
63
|
-
filterable: true,
|
|
64
|
-
editable: false,
|
|
65
|
-
icon: 'user',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: 'Parcela',
|
|
69
|
-
description: 'Número da parcela da venda',
|
|
70
|
-
reason: '',
|
|
71
|
-
path: 'installment',
|
|
72
|
-
format: 'Installment',
|
|
73
|
-
type: 'Number',
|
|
74
|
-
options: null,
|
|
75
|
-
sortable: true,
|
|
76
|
-
displayable: true,
|
|
77
|
-
filterable: true,
|
|
78
|
-
editable: false,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
title: 'Status',
|
|
82
|
-
description: 'Status atual da cobrança',
|
|
83
|
-
reason: '',
|
|
84
|
-
path: 'status',
|
|
85
|
-
format: 'PaymentStatus',
|
|
86
|
-
type: 'String',
|
|
87
|
-
options: {
|
|
88
|
-
enum: [
|
|
89
|
-
'open',
|
|
90
|
-
'refunded',
|
|
91
|
-
'chargeback',
|
|
92
|
-
'in_protest',
|
|
93
|
-
'paid',
|
|
94
|
-
'released',
|
|
95
|
-
'pending',
|
|
96
|
-
'failed',
|
|
97
|
-
'expired',
|
|
98
|
-
'late',
|
|
99
|
-
'canceled',
|
|
100
|
-
],
|
|
101
|
-
},
|
|
102
|
-
sortable: false,
|
|
103
|
-
displayable: true,
|
|
104
|
-
filterable: true,
|
|
105
|
-
editable: false,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
title: 'Valor',
|
|
109
|
-
description: 'Valor total cobrado do cliente',
|
|
110
|
-
reason: '',
|
|
111
|
-
path: 'price.amount',
|
|
112
|
-
format: 'Amount',
|
|
113
|
-
type: 'Number',
|
|
114
|
-
options: null,
|
|
115
|
-
sortable: true,
|
|
116
|
-
displayable: true,
|
|
117
|
-
filterable: true,
|
|
118
|
-
editable: true,
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
}
|
|
122
|
-
Vue.prototype.$L.Schemas.register('payable', PayableSchema)
|
|
123
|
-
|
|
124
|
-
import App from './docs'
|
|
125
|
-
import routes from './docs/routes'
|
|
126
|
-
|
|
127
|
-
const router = new VueRouter({ routes })
|
|
128
|
-
|
|
129
|
-
new Vue({
|
|
130
|
-
router,
|
|
131
|
-
render: (h) => h(App),
|
|
132
|
-
}).$mount('#app')
|
package/src/main.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import lang from "element-ui/lib/locale/lang/pt-br";
|
|
2
|
-
import locale from "element-ui/lib/locale";
|
|
3
|
-
import "dayjs/locale/pt-br";
|
|
4
|
-
import dayjs from "dayjs";
|
|
5
|
-
import localizedFormatPlugin from "dayjs/plugin/localizedFormat";
|
|
6
|
-
|
|
7
|
-
import "./style/main.scss";
|
|
8
|
-
import Colors from "./helpers/Colors";
|
|
9
|
-
import Icons from "./helpers/Icons";
|
|
10
|
-
import Schemas from "./helpers/Schemas";
|
|
11
|
-
import Notification from "./helpers/Notification";
|
|
12
|
-
import FieldTypeComponents from "./helpers/FieldTypeComponents";
|
|
13
|
-
import RegisterElementUIComponents from "./helpers/RegisterElementUIComponents";
|
|
14
|
-
|
|
15
|
-
// Vant
|
|
16
|
-
import Vant from "vant";
|
|
17
|
-
import "vant/lib/index.css";
|
|
18
|
-
// Zoomer
|
|
19
|
-
import VueZoomer from "vue-zoomer";
|
|
20
|
-
|
|
21
|
-
function hasRequire() {
|
|
22
|
-
try {
|
|
23
|
-
void require.context;
|
|
24
|
-
return true;
|
|
25
|
-
} catch (e) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const LayersDesignSystem = {};
|
|
31
|
-
LayersDesignSystem.install = function (Vue) {
|
|
32
|
-
Vue.prototype.$L = {};
|
|
33
|
-
|
|
34
|
-
Vue.use(Vant);
|
|
35
|
-
Vue.use(VueZoomer);
|
|
36
|
-
Vue.use(Colors);
|
|
37
|
-
Vue.use(Icons);
|
|
38
|
-
Vue.use(Schemas);
|
|
39
|
-
Vue.use(FieldTypeComponents);
|
|
40
|
-
Vue.use(RegisterElementUIComponents);
|
|
41
|
-
|
|
42
|
-
locale.use(lang);
|
|
43
|
-
dayjs.extend(localizedFormatPlugin);
|
|
44
|
-
|
|
45
|
-
Vue.mixin({
|
|
46
|
-
mounted() {
|
|
47
|
-
this.__layers_addClassName();
|
|
48
|
-
},
|
|
49
|
-
updated() {
|
|
50
|
-
this.__layers_addClassName();
|
|
51
|
-
},
|
|
52
|
-
methods: {
|
|
53
|
-
__layers_addClassName() {
|
|
54
|
-
if (!this.__layers_addedClassName) {
|
|
55
|
-
const tagName = this.$options.tagName || "";
|
|
56
|
-
if (/^l-/.test(tagName) && this.$el.classList) {
|
|
57
|
-
this.$el.classList.add(tagName);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
Vue.prototype.$notify = function (params) {
|
|
65
|
-
const isClickable = params.onClick && params.onClick instanceof Function;
|
|
66
|
-
const customClasses = [
|
|
67
|
-
params.customClass,
|
|
68
|
-
params.type,
|
|
69
|
-
!params.customClass && !params.type && "default",
|
|
70
|
-
isClickable && "cursor-pointer",
|
|
71
|
-
];
|
|
72
|
-
|
|
73
|
-
return Notification({
|
|
74
|
-
...params,
|
|
75
|
-
customClass: customClasses.filter((customClass) => customClass).join(" "),
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
if (hasRequire()) {
|
|
80
|
-
const requireComponent = require.context(
|
|
81
|
-
"./components",
|
|
82
|
-
true,
|
|
83
|
-
/index.vue$/
|
|
84
|
-
);
|
|
85
|
-
requireComponent.keys().forEach((path) => {
|
|
86
|
-
const component = requireComponent(path).default;
|
|
87
|
-
if (!component.tagName) throw new Error(`Missing tagName for ${path}`);
|
|
88
|
-
Vue.component(component.tagName, component);
|
|
89
|
-
});
|
|
90
|
-
} else {
|
|
91
|
-
const components = import.meta.glob("./components/**/index.vue", {
|
|
92
|
-
eager: true,
|
|
93
|
-
});
|
|
94
|
-
for (const componentModule of Object.values(components)) {
|
|
95
|
-
Vue.component(componentModule.default.tagName, componentModule.default);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export { Notification };
|
|
101
|
-
export default LayersDesignSystem;
|
package/src/style/colors.scss
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@function hexToRGBString($hexColor) {
|
|
2
|
-
@return "#{red($hexColor)},#{green($hexColor)},#{blue($hexColor)}";
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
@function setOpacity($color) {
|
|
6
|
-
@return "rgba(#{hexToRGBString($color)}, 0.12)";
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@each $key, $value in $colors {
|
|
10
|
-
.#{"" + $key} {
|
|
11
|
-
background-color: #{$value} !important;
|
|
12
|
-
}
|
|
13
|
-
.#{"" + $key}-outline {
|
|
14
|
-
border-color: #{$value} !important;
|
|
15
|
-
}
|
|
16
|
-
.#{"" + $key}--text {
|
|
17
|
-
color: #{$value} !important;
|
|
18
|
-
}
|
|
19
|
-
.color-#{"" + $key} {
|
|
20
|
-
color: #{$value};
|
|
21
|
-
}
|
|
22
|
-
.bg-color-#{"" + $key} {
|
|
23
|
-
background-color: #{$value};
|
|
24
|
-
}
|
|
25
|
-
& {
|
|
26
|
-
--#{"" + $key}: #{$value};
|
|
27
|
-
--color-#{"" + $key}: #{$value};
|
|
28
|
-
--color-#{"" + $key}-rgb: #{hexToRGBString($value)};
|
|
29
|
-
--color-#{"" + $key}-op: #{setOpacity($value)};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
@import "./layers-variables.scss";
|
|
2
|
-
|
|
3
|
-
$--color-primary: $aqua;
|
|
4
|
-
$--color-success: $success;
|
|
5
|
-
$--color-warning: $yellow-dark;
|
|
6
|
-
$--color-danger: $danger;
|
|
7
|
-
$--color-info: $lead-light;
|
|
8
|
-
|
|
9
|
-
:root {
|
|
10
|
-
--color-primary: #{$--color-primary};
|
|
11
|
-
--color-success: #{$--color-success};
|
|
12
|
-
--color-warning: #{$--color-warning};
|
|
13
|
-
--color-danger: #{$--color-danger};
|
|
14
|
-
--color-info: #{$--color-info};
|
|
15
|
-
--white: #{$white};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* icon font path, required */
|
|
19
|
-
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
|
20
|
-
|
|
21
|
-
@import "~element-ui/packages/theme-chalk/src/index";
|
package/src/style/icons.scss
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/* Brand Colors */
|
|
2
|
-
$aqua: #00b8ad;
|
|
3
|
-
$aqua-dark: #00a69c;
|
|
4
|
-
$aqua-light: rgba($aqua, 0.1);
|
|
5
|
-
$purple: #5451d6;
|
|
6
|
-
$purple-dark: #4644b5;
|
|
7
|
-
$salmon: #f97777;
|
|
8
|
-
$salmon-dark: #e86161;
|
|
9
|
-
$yellow: #ffca65;
|
|
10
|
-
$yellow-dark: #f5b845;
|
|
11
|
-
$lead: #232b34;
|
|
12
|
-
$lead-light: #434e5b;
|
|
13
|
-
$white: #ffffff;
|
|
14
|
-
$gray: #808080;
|
|
15
|
-
$red: #ed6b4f;
|
|
16
|
-
$green: #30b565;
|
|
17
|
-
|
|
18
|
-
/* Feedback Colors */
|
|
19
|
-
$link: #2f8af5;
|
|
20
|
-
$link-light: rgba($link, 0.1);
|
|
21
|
-
$success: #30b565;
|
|
22
|
-
$success-light: rgba($success, 0.1);
|
|
23
|
-
$warning: #f0af09;
|
|
24
|
-
$warning-light: rgba($warning, 0.12);
|
|
25
|
-
$danger: #ed6b4f;
|
|
26
|
-
$danger-light: rgba($danger, 0.1);
|
|
27
|
-
|
|
28
|
-
/* Greyscale Colors */
|
|
29
|
-
$gray-10: #F4F6F8;
|
|
30
|
-
$gray-20: #EEF1F5;
|
|
31
|
-
$gray-30: #E8ECEF;
|
|
32
|
-
$gray-40: #D7DEE3;
|
|
33
|
-
$gray-50: #C8D0D8;
|
|
34
|
-
$gray-60: #A3B1BF;
|
|
35
|
-
$gray-70: #748494;
|
|
36
|
-
$gray-80: #405261;
|
|
37
|
-
$gray-90: #1D2B36;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
$colors: (
|
|
41
|
-
aqua: $aqua,
|
|
42
|
-
aqua-dark: $aqua-dark,
|
|
43
|
-
aqua-light: $aqua-light,
|
|
44
|
-
purple: $purple,
|
|
45
|
-
purple-dark: $purple-dark,
|
|
46
|
-
salmon: $salmon,
|
|
47
|
-
salmon-dark: $salmon-dark,
|
|
48
|
-
yellow: $yellow,
|
|
49
|
-
yellow-dark: $yellow-dark,
|
|
50
|
-
lead: $lead,
|
|
51
|
-
lead-light: $lead-light,
|
|
52
|
-
white: $white,
|
|
53
|
-
red: $red,
|
|
54
|
-
green: $green,
|
|
55
|
-
link: $link,
|
|
56
|
-
link-light: $link-light,
|
|
57
|
-
success: $success,
|
|
58
|
-
success-light: $success-light,
|
|
59
|
-
warning: $warning,
|
|
60
|
-
warning-light: $warning-light,
|
|
61
|
-
danger: $danger,
|
|
62
|
-
danger-light: $danger-light,
|
|
63
|
-
gray: $gray,
|
|
64
|
-
gray-10: $gray-10,
|
|
65
|
-
gray-20: $gray-20,
|
|
66
|
-
gray-30: $gray-30,
|
|
67
|
-
gray-40: $gray-40,
|
|
68
|
-
gray-50: $gray-50,
|
|
69
|
-
gray-60: $gray-60,
|
|
70
|
-
gray-70: $gray-70,
|
|
71
|
-
gray-80: $gray-80,
|
|
72
|
-
gray-90: $gray-90,
|
|
73
|
-
);
|