groovinads-ui 1.2.68 → 1.2.70

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.
@@ -2,23 +2,25 @@ import React, { useState } from 'react';
2
2
  import DropdownMultiSelect from '../components/Dropdowns/DropdownMultiSelect';
3
3
 
4
4
  export default {
5
- title: 'Dropdown/DropdownMultiSelect',
6
- component: DropdownMultiSelect,
5
+ title: 'Dropdown/DropdownMultiSelect',
6
+ component: DropdownMultiSelect,
7
7
  };
8
8
 
9
9
  const Template = (args) => {
10
10
  const [show, setShow] = useState(false);
11
+ const [errorRequired, setErrorRequired] = useState(false);
12
+
11
13
  const handleToggle = () => setShow((prevShow) => !prevShow);
12
14
 
13
15
  /* ========== */
14
16
  /* OPCION 1 - Opciones y valores seleccionados son array de objetos */
15
17
  const filters = [
16
- { id: 1, name: 'Filter 1', showStatus: '1' },
17
- { id: 2, name: 'Filter 2', showStatus: '0' },
18
- { id: 3, name: 'Filter 3', showStatus: '1' },
19
- { id: 4, name: 'Filter 4', showStatus: '0' },
20
- { id: 5, name: 'Filter 5', showStatus: '0' },
21
- { id: 6, name: 'Filter 6', showStatus: '2' },
18
+ { id: 1, name: 'Filter 1', showStatus: '1', name1: 'loreal' },
19
+ { id: 2, name: 'Filter 2', showStatus: '0', name1: 'jabon' },
20
+ { id: 3, name: 'Filter 3', showStatus: '1', name1: 'blue' },
21
+ { id: 4, name: 'Filter 4', showStatus: '0', name1: 'name' },
22
+ { id: 5, name: 'Filter 5', showStatus: '0', name1: 'name' },
23
+ { id: 6, name: 'Filter 6', showStatus: '2', name1: 'name' },
22
24
  ];
23
25
  const [selectedValues, setSelectedValues] = useState([]);
24
26
  /* ========== */
@@ -33,11 +35,12 @@ const Template = (args) => {
33
35
  'Filter 5',
34
36
  ];
35
37
  const [selectedStringValues, setSelectedStringValues] = useState([]);
38
+
39
+ /* const list= ['palabra1', 'palabra2'] */
36
40
  /* =========== */
37
41
 
38
42
  return (
39
43
  <>
40
- {/* OPCION 1 */}
41
44
  <DropdownMultiSelect
42
45
  {...args}
43
46
  values={filters}
@@ -47,27 +50,21 @@ const Template = (args) => {
47
50
  onToggle={handleToggle}
48
51
  object={true}
49
52
  nameKey='name'
53
+ nameKey1='name1'
50
54
  idKey={'id'}
51
55
  inputLabel={'Filters (array de objetos)'}
52
56
  focus={show}
53
- hasId={true}
57
+ hasId={false}
58
+ errorRequired={errorRequired}
59
+ setErrorRequiered={setErrorRequired}
60
+ validate={true}
61
+ disableHash={true}
62
+ overflow={true}
54
63
  />
55
64
 
56
- {/* OPCION 2 */}
57
- <DropdownMultiSelect
58
- {...args}
59
- values={stringFilters}
60
- valuesSelected={selectedStringValues}
61
- setValuesSelected={setSelectedStringValues}
62
- show={show}
63
- onToggle={handleToggle}
64
- object={false}
65
- nameKey='name'
66
- idKey={'id'}
67
- inputLabel={'Filters (array de strings)'}
68
- focus={show}
69
- hasId={true}
70
- />
65
+ <button className='my-3' onClick={() => setErrorRequired(true)}>
66
+ Validate
67
+ </button>
71
68
  </>
72
69
  );
73
70
  };
@@ -1,21 +1,24 @@
1
- import React from "react";
2
- import Navbar from "../components/Navigation/Navbar";
3
- import { BrowserRouter, Route, Routes } from "react-router-dom";
1
+ import React, { useState } from 'react';
2
+ import Navbar from '../components/Navigation/Navbar';
4
3
 
5
4
  export default {
6
- title: "Navigation/Navbar",
7
- component: Navbar,
5
+ title: 'Navigation/Navbar',
6
+ component: Navbar,
8
7
  };
9
8
 
10
9
  const Template = (args) => {
11
- return (
12
- <Navbar {...args}></Navbar>
13
- /* <BrowserRouter>
10
+ return (
11
+ <Navbar
12
+ {...args}
13
+ showDeckMenu={true}
14
+ showUserMenu={true}
15
+ ></Navbar>
16
+ /* <BrowserRouter>
14
17
  <Routes>
15
18
  <Route path="*" element={<Navbar {...args}></Navbar>} />
16
19
  </Routes>
17
20
  </BrowserRouter> */
18
- );
21
+ );
19
22
  };
20
23
 
21
24
  export const Default = Template.bind({});
@@ -1,4 +1,4 @@
1
- import React, { Children } from 'react';
1
+ import React, { Children, useState } from 'react';
2
2
  import { Sidebar } from '../components/Navigation';
3
3
 
4
4
  export default {
@@ -12,12 +12,29 @@ const Template = (args) => {
12
12
  {
13
13
  title: 'Main menu', // section.title
14
14
  links: [
15
-
16
15
  {
17
- name: 'Home',
18
- icon: 'home',
16
+ name: 'Campaings',
17
+ icon: 'home',
19
18
  url: '/home',
20
19
  children: [],
20
+ pendingLength: 5, // explanation(number) Pass the length of the array from the relevant endpoint data, for example, if there are pending campaigns.
21
+ // Not required, only if you want to display a type of pendingType ('warning' or 'badge').
22
+ pendingType: 'warning',
23
+ },
24
+ {
25
+ name: 'Reports',
26
+ icon: 'home',
27
+ url: '/home',
28
+ children: [
29
+ /* {
30
+ name: 'Item 1',
31
+ icon: 'home',
32
+ url: '/home',
33
+ children: [],
34
+ }, */
35
+ ],
36
+ pendingLength: 5,
37
+ pendingType: 'badge',
21
38
  },
22
39
  ],
23
40
  },
@@ -26,7 +43,7 @@ const Template = (args) => {
26
43
  links: [
27
44
  {
28
45
  name: 'Impressions',
29
- icon: 'table',
46
+ icon: 'table',
30
47
  url: '',
31
48
  children: [
32
49
  {
@@ -44,6 +61,14 @@ const Template = (args) => {
44
61
  name: 'Monthly impressions by...',
45
62
  url: '/impressions',
46
63
  },
64
+ {
65
+ name: '2Monthly impressions by...',
66
+ url: '/2impressions',
67
+ },
68
+ {
69
+ name: '3Monthly impressions by...',
70
+ url: '/3impressions',
71
+ },
47
72
  ],
48
73
  },
49
74
  ],
@@ -117,7 +142,7 @@ const Template = (args) => {
117
142
  php_session_id: 'u7o2br84i92jmfkdrqen10ngp1',
118
143
  is_api2_login: true,
119
144
  };
120
-
145
+
121
146
  return (
122
147
  <div className='container-fluid'>
123
148
  <Sidebar
package/version.js ADDED
@@ -0,0 +1,8 @@
1
+ import packageJson from './package.json';
2
+
3
+ if (typeof window !== 'undefined') {
4
+ window.GroovinUI = {
5
+ version: packageJson.version,
6
+ };
7
+ }
8
+ export default packageJson.version;