layers-design-system 2.0.4 → 2.0.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "layers-design-system",
3
3
  "main": "src/main.js",
4
- "version": "2.0.4",
4
+ "version": "2.0.5",
5
5
  "scripts": {
6
6
  "start": "vue-cli-service serve ./src/main-docs.js",
7
7
  "build": "vue-cli-service build --target lib ./src/main.js",
@@ -28,10 +28,10 @@
28
28
  "@tiptap/vue-2": "2.0.0-beta.60",
29
29
  "core-js": "^3.25.2",
30
30
  "currency.js": "1.2.2",
31
+ "dayjs": "^1.11.7",
31
32
  "dompurify": "2.3.3",
32
33
  "element-ui": "2.15.6",
33
34
  "layers-utils": "1.0.4",
34
- "moment": "2.29.1",
35
35
  "mustache": "4.2.0",
36
36
  "sass-loader": "7.3.1",
37
37
  "tiptap": "1.32.2",
@@ -6,7 +6,7 @@
6
6
  </span>
7
7
  </template>
8
8
  <script>
9
- import moment from "moment";
9
+ import dayjs from 'dayjs';
10
10
  import { get } from "lodash";
11
11
 
12
12
  export default {
@@ -39,7 +39,7 @@ export default {
39
39
  return `${this.filter.value} ${this.filter.value > 1 ? 'dias' : 'dia'}`
40
40
  }
41
41
  const format = get(this.schema, 'options.format', 'LL')
42
- return moment(this.filter.value).format(format)
42
+ return dayjs(this.filter.value, { locale: 'pt-br' }).format(format)
43
43
  }
44
44
  }
45
45
  };
@@ -3,7 +3,7 @@
3
3
  </template>
4
4
  <script>
5
5
  import { get } from "lodash";
6
- import moment from "moment";
6
+ import dayjs from "dayjs"
7
7
 
8
8
  export default {
9
9
  props: ["value", "schema"],
@@ -11,7 +11,7 @@ export default {
11
11
  formatValue(value, schema) {
12
12
  if (!value) return "-"
13
13
  const format = get(schema, 'options.format', 'dd/MM/yyyy hh:mm:ss')
14
- return moment(value).format(format)
14
+ return dayjs(value, { locale: 'pt-br' }).format(format)
15
15
  }
16
16
  }
17
17
  };
package/src/main.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import lang from 'element-ui/lib/locale/lang/pt-br'
2
2
  import locale from 'element-ui/lib/locale'
3
- import moment from 'moment'
3
+ import 'dayjs/locale/pt-br'
4
+ import dayjs from 'dayjs'
5
+ import localizedFormatPlugin from 'dayjs/plugin/localizedFormat';
4
6
 
5
7
  import './style/main.scss'
6
8
  import Colors from './helpers/Colors'
@@ -29,7 +31,7 @@ LayersDesignSystem.install = function(Vue) {
29
31
  Vue.use(RegisterElementUIComponents)
30
32
 
31
33
  locale.use(lang)
32
- moment.locale('pt-br')
34
+ dayjs.extend(localizedFormatPlugin)
33
35
 
34
36
  Vue.mixin({
35
37
  mounted() {