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.
Files changed (41) hide show
  1. package/components/app/index.vue +14 -14
  2. package/components/{notify → app/notify}/index.vue +1 -1
  3. package/components/{notify → app/notify}/notification.vue +0 -0
  4. package/components/{notify → app/notify}/notify.js +0 -0
  5. package/components/app/style.scss +0 -1
  6. package/components/{toast → app/toast}/index.vue +0 -0
  7. package/components/{toast → app/toast}/style.scss +1 -1
  8. package/components/{toast → app/toast}/toast.js +0 -0
  9. package/components/{toast → app/toast}/toast.vue +0 -0
  10. package/components/breadcrumb/bredcrumbItem.vue +11 -11
  11. package/components/breadcrumb/index.vue +6 -5
  12. package/components/chart/chart.vue +3 -0
  13. package/components/chat/chatInput.vue +139 -135
  14. package/components/codeEditor/index.vue +432 -449
  15. package/components/codeEditor/run.vue +76 -80
  16. package/components/content/style.scss +0 -1
  17. package/components/form/address.vue +109 -109
  18. package/components/form/address_ir.vue +106 -0
  19. package/components/form/colorPicker/Alpha.vue +3 -0
  20. package/components/form/colorPicker/Preview.vue +3 -0
  21. package/components/form/group-input.vue +2 -1
  22. package/components/form/number.vue +1 -1
  23. package/components/iframe/index.vue +1 -1
  24. package/components/index.js +178 -88
  25. package/components/infinite/index.vue +0 -2
  26. package/components/menu/index.vue +173 -125
  27. package/components/modal/index.vue +85 -90
  28. package/components/modal/style.scss +0 -1
  29. package/components/table/crud/index.vue +12 -13
  30. package/directive/clickOutSide/index.js +2 -3
  31. package/directive/drag/index.js +1 -2
  32. package/directive/intersect/index.js +3 -3
  33. package/directive/resize/index.js +3 -4
  34. package/directive/ripple/index.js +4 -6
  35. package/directive/scroll/index.js +3 -4
  36. package/directive/sortable/index.js +1 -2
  37. package/directive/title/index.js +2 -3
  38. package/directive/touch/index.js +1 -2
  39. package/index.js +4 -5
  40. package/package.json +1 -1
  41. 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,//Standard timezone offset minutes -07:00
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
- const required_directive = register(app, options['components'] || []);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "renusify",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Vue3 Framework",
5
5
  "keywords": [
6
6
  "vuejs",
@@ -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
- key=key.toLowerCase()
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 {