@farm-investimentos/front-mfe-components 11.1.0 → 11.2.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.
Files changed (48) hide show
  1. package/dist/front-mfe-components.common.js +790 -695
  2. package/dist/front-mfe-components.common.js.map +1 -1
  3. package/dist/front-mfe-components.css +2 -2
  4. package/dist/front-mfe-components.umd.js +790 -695
  5. package/dist/front-mfe-components.umd.js.map +1 -1
  6. package/dist/front-mfe-components.umd.min.js +1 -1
  7. package/dist/front-mfe-components.umd.min.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/Buttons/ExportButton/ExportButton.stories.js +11 -4
  10. package/src/components/Buttons/ExportButton/ExportButton.vue +29 -70
  11. package/src/components/Card/Card.scss +2 -2
  12. package/src/components/Card/Card.stories.js +0 -1
  13. package/src/components/Card/Card.vue +4 -1
  14. package/src/components/Card/CardComposition.stories.ts +1 -2
  15. package/src/components/Card/CardContent/CardContent.stories.js +13 -2
  16. package/src/components/Card/CardContent/CardContent.vue +6 -3
  17. package/src/components/Checkbox/Checkbox.scss +10 -0
  18. package/src/components/Checkbox/Checkbox.stories.js +15 -1
  19. package/src/components/Checkbox/Checkbox.vue +9 -1
  20. package/src/components/ContextMenu/ContextMenu.vue +18 -8
  21. package/src/components/DataTableHeader/DataTableHeader.scss +9 -1
  22. package/src/components/DataTableHeader/DataTableHeader.stories.js +48 -24
  23. package/src/components/DataTableHeader/DataTableHeader.vue +7 -11
  24. package/src/components/DataTablePaginator/DataTablePaginator.scss +24 -7
  25. package/src/components/DataTablePaginator/DataTablePaginator.vue +45 -11
  26. package/src/components/DatePicker/DatePicker.vue +6 -0
  27. package/src/components/DialogHeader/DialogHeader.stories.js +11 -0
  28. package/src/components/DialogHeader/DialogHeader.vue +8 -9
  29. package/src/components/Form/Form.stories.js +52 -0
  30. package/src/components/Form/Form.vue +2 -0
  31. package/src/components/IconBox/IconBox.scss +8 -0
  32. package/src/components/IconBox/IconBox.vue +1 -1
  33. package/src/components/IdCaption/IdCaption.stories.js +18 -0
  34. package/src/components/IdCaption/IdCaption.vue +21 -2
  35. package/src/components/Loader/Loader.stories.ts +1 -1
  36. package/src/components/Loader/Loader.vue +50 -58
  37. package/src/components/Modal/Modal.scss +0 -1
  38. package/src/components/Modal/Modal.vue +13 -4
  39. package/src/components/RangeDatePicker/RangeDatePicker.vue +6 -0
  40. package/src/components/Switcher/Switcher.scss +6 -0
  41. package/src/components/Switcher/Switcher.stories.js +28 -0
  42. package/src/components/Switcher/Switcher.vue +27 -2
  43. package/src/components/TableContextMenu/TableContextMenu.stories.js +15 -0
  44. package/src/components/Typography/Typography.scss +2 -1
  45. package/src/helpers/calculateMainZindex.js +10 -0
  46. package/src/helpers/date.js +3 -0
  47. package/src/helpers/index.js +1 -0
  48. package/src/components/Switcher/Switcher.api.stories.js +0 -20
@@ -64,3 +64,18 @@ export const ClickHandler = () => ({
64
64
  <farm-context-menu :items="[{ label: 'Click me', icon: { type: 'open-in-new' }, handler: 'edit' }]" @edit="editItem()" />
65
65
  </div>`,
66
66
  });
67
+
68
+ export const OnRightSide = () => ({
69
+ data() {
70
+ return {
71
+ items: [
72
+ { label: 'Novo', icon: { type: 'open-in-new' } },
73
+ { label: 'Nome bem longo sem quebrar linha', icon: { color: 'secondary', type: 'open-in-new' } },
74
+ { label: 'Remover', icon: { color: 'error', type: 'delete' } },
75
+ ],
76
+ };
77
+ },
78
+ template: `<div style="padding-left: 80px; display: flex; justify-content: end;">
79
+ <farm-context-menu ref="multi" :items="items" />
80
+ </div>`,
81
+ });
@@ -59,4 +59,5 @@
59
59
  font-size: calc(#{$val} - 2px);
60
60
  }
61
61
  }
62
- }
62
+ }
63
+
@@ -0,0 +1,10 @@
1
+ export default () => {
2
+ const zIndex = Math.max(
3
+ ...Array.from(document.querySelectorAll('body *'), el =>
4
+ parseFloat(window.getComputedStyle(el).zIndex)
5
+ ).filter(zIndex => !Number.isNaN(zIndex)),
6
+ 0
7
+ );
8
+
9
+ return zIndex;
10
+ };
@@ -6,6 +6,9 @@ export const defaultFormat = (data, UTCTimeZone = true) => {
6
6
  };
7
7
 
8
8
  export const convertDate = (data) => {
9
+ if(!data) {
10
+ return '';
11
+ }
9
12
  let newdate = data.split("/").reverse().join("-");
10
13
  return newdate;
11
14
  };
@@ -0,0 +1 @@
1
+ export { default as calculateMainZindex } from './calculateMainZindex';
@@ -1,20 +0,0 @@
1
- import Switch from './Switcher';
2
-
3
- export default {
4
- title: 'Form/Switcher',
5
- component: Switch,
6
- };
7
-
8
- export const Primary = () => ({
9
- components: { 'farm-switch': Switch },
10
- data() {
11
- return {
12
- selectedValue: false,
13
- };
14
- },
15
- template: `<div>
16
- <farm-switch v-model="selectedValue" block />
17
- </div>`,
18
- });
19
-
20
- Primary.storyName = 'Basic';