renusify 1.0.4 → 1.0.6
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/components/app/index.vue +14 -14
- package/components/{notify → app/notify}/index.vue +1 -1
- package/components/{notify → app/notify}/notification.vue +0 -0
- package/components/{notify → app/notify}/notify.js +0 -0
- package/components/app/style.scss +0 -1
- package/components/{toast → app/toast}/index.vue +0 -0
- package/components/{toast → app/toast}/style.scss +1 -1
- package/components/{toast → app/toast}/toast.js +0 -0
- package/components/{toast → app/toast}/toast.vue +0 -0
- package/components/breadcrumb/bredcrumbItem.vue +11 -11
- package/components/breadcrumb/index.vue +6 -5
- package/components/chart/chart.vue +3 -0
- package/components/chat/chatInput.vue +139 -135
- package/components/codeEditor/index.vue +432 -449
- package/components/codeEditor/run.vue +76 -80
- package/components/content/style.scss +0 -1
- package/components/form/address.vue +109 -109
- package/components/form/address_ir.vue +106 -0
- package/components/form/colorPicker/Alpha.vue +3 -0
- package/components/form/colorPicker/Preview.vue +3 -0
- package/components/form/group-input.vue +2 -1
- package/components/form/number.vue +1 -1
- package/components/iframe/index.vue +1 -1
- package/components/index.js +178 -88
- package/components/infinite/index.vue +0 -2
- package/components/menu/index.vue +173 -125
- package/components/modal/index.vue +85 -90
- package/components/modal/style.scss +0 -1
- package/components/table/crud/index.vue +12 -13
- package/directive/clickOutSide/index.js +2 -3
- package/directive/drag/index.js +1 -2
- package/directive/intersect/index.js +3 -3
- package/directive/resize/index.js +3 -4
- package/directive/ripple/index.js +4 -6
- package/directive/scroll/index.js +3 -4
- package/directive/sortable/index.js +1 -2
- package/directive/title/index.js +2 -3
- package/directive/touch/index.js +1 -2
- package/index.js +4 -5
- package/package.json +1 -1
- package/plugins/trans/Translate.js +12 -14
package/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import Translate from './plugins/trans/Translate';
|
|
|
4
4
|
import Storage from './plugins/storage/index';
|
|
5
5
|
import DateTime from './plugins/trans/DateTime';
|
|
6
6
|
import Currency from './plugins/trans/Currency';
|
|
7
|
-
import Notify from './components/notify/notify.js';
|
|
7
|
+
import Notify from './components/app/notify/notify.js';
|
|
8
8
|
import valid from './plugins/validation/Validate';
|
|
9
|
-
import Toast from './components/toast/toast.js';
|
|
9
|
+
import Toast from './components/app/toast/toast.js';
|
|
10
10
|
import event from './plugins/event';
|
|
11
11
|
import {register} from './components';
|
|
12
12
|
import {registers} from './directive';
|
|
@@ -67,7 +67,7 @@ export default {
|
|
|
67
67
|
{
|
|
68
68
|
'en': {
|
|
69
69
|
first_day: 0,
|
|
70
|
-
time_zone_offset: -480
|
|
70
|
+
time_zone_offset: -480,/*Standard timezone offset minutes -07:00*/
|
|
71
71
|
daylight_saving_time: true,
|
|
72
72
|
localizeName: 'en-US',
|
|
73
73
|
timeZone: 'America/Los_Angeles',
|
|
@@ -114,8 +114,7 @@ export default {
|
|
|
114
114
|
app.config.globalProperties.$v = (names) => valid.checkType(names)
|
|
115
115
|
|
|
116
116
|
// install components
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
let required_directive = register(app, options['components'] || []);
|
|
119
118
|
if (options['directives']) {
|
|
120
119
|
options['directives'].forEach((i) => {
|
|
121
120
|
if (!required_directive.includes(i)) {
|
package/package.json
CHANGED
|
@@ -30,6 +30,9 @@ class Translate {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
add(key, value) {
|
|
33
|
+
if (!this._messages[this._local]) {
|
|
34
|
+
this._messages[this._local] = {}
|
|
35
|
+
}
|
|
33
36
|
this._messages[this._local][key] = value;
|
|
34
37
|
}
|
|
35
38
|
|
|
@@ -53,17 +56,19 @@ class Translate {
|
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
|
|
56
|
-
if(package_name&&typeof package_name!=='string'){
|
|
59
|
+
if (package_name && typeof package_name !== 'string') {
|
|
57
60
|
console.error(
|
|
58
|
-
'package name must be string. key:'+key+' package_name:'+package_name
|
|
61
|
+
'package name must be string. key:' + key + ' package_name:' + package_name
|
|
59
62
|
)
|
|
60
63
|
return key
|
|
61
64
|
}
|
|
65
|
+
if (typeof key !== 'string') {
|
|
66
|
+
return key
|
|
67
|
+
}
|
|
68
|
+
key = key.toLowerCase()
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const local = lang!==null?lang : this._local
|
|
66
|
-
const pack = package_name !==null?package_name: this._package
|
|
70
|
+
const local = lang !== null ? lang : this._local
|
|
71
|
+
const pack = package_name !== null ? package_name : this._package
|
|
67
72
|
if (!local) {
|
|
68
73
|
return key;
|
|
69
74
|
}
|
|
@@ -80,7 +85,7 @@ class Translate {
|
|
|
80
85
|
return key;
|
|
81
86
|
}
|
|
82
87
|
return val;
|
|
83
|
-
} else if (window.app.$r.autoAddTranslate && pack && this._count < 100 && /^([a-z_.])*$/.test(key)) {
|
|
88
|
+
} else if (window.app.$r && window.app.$r.autoAddTranslate && pack && this._count < 100 && /^([a-z_.])*$/.test(key)) {
|
|
84
89
|
if (!this._store.includes(key)) {
|
|
85
90
|
let url = '/translate/' + pack + '/' + key + '?v=';
|
|
86
91
|
const lng = variable.length
|
|
@@ -120,12 +125,6 @@ class Translate {
|
|
|
120
125
|
if (window.app.$storage.get("lang")) {
|
|
121
126
|
locale = window.app.$storage.get("lang");
|
|
122
127
|
}
|
|
123
|
-
if (window.app.$storage.get(`msg-${pack}`)) {
|
|
124
|
-
const msg = window.app.$storage.get(`msg-${pack}`);
|
|
125
|
-
this.local = locale;
|
|
126
|
-
this.setMessages(msg);
|
|
127
|
-
window.app.$r.store['langs_loaded'][pack] = true;
|
|
128
|
-
}
|
|
129
128
|
Axios.get(`/translate/${pack}/${locale}`).then(
|
|
130
129
|
res => {
|
|
131
130
|
if (res.data.length !== 0) {
|
|
@@ -134,7 +133,6 @@ class Translate {
|
|
|
134
133
|
for (let i = 0; i < lng; i++) {
|
|
135
134
|
lang[res.data[i].key] = res.data[i][locale];
|
|
136
135
|
}
|
|
137
|
-
window.app.$storage.set(`msg-${pack}`, lang);
|
|
138
136
|
this.local = locale;
|
|
139
137
|
this.setMessages(lang);
|
|
140
138
|
} else {
|