playbook_ui 13.8.0.pre.alpha.PLAY962SingleSelect1256 → 13.8.0.pre.alpha.PLAY1016reactionbuttonemojibug1245

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8102315dc69078080e1f98874ceea21fcd821128990090d05be19a2e4b4cb17
4
- data.tar.gz: b7927d75f3b7bdbebc9dddcd46ece644ace71c20ffd799e663ae22cfd17f6f40
3
+ metadata.gz: ffbc0de9897a5a39191f65def3ab36d7a9addfba0d1aadafaeafdd49e46cf125
4
+ data.tar.gz: 812f051276f0e616e9840dbcf2e974c2ac674edf2c40be72a3a104f8c201b652
5
5
  SHA512:
6
- metadata.gz: b73def220f81c357ac0cdc409fa4503171f3bdad7b32d0f57585c30520b52ad605700c2c51db1172f03b3ef143d893f4a7ed1cf23e976dd497915281c0750175
7
- data.tar.gz: 6c46e0f9e4933526ea0a26c340dd9cf5cd0d267c376750c71172891d2a3029040727530b54070064d22b1f31d0fa9c4ee30cd2c596a58148213c07ef1fb206b9
6
+ metadata.gz: 570df4d72fdec4376ef4e899e71513012e3653c8ec926b91029f143f3c439dba769fd2840cb6be745ad85dfc835a00a0a39f54c1ead9e576d8dea3443ecd03c4
7
+ data.tar.gz: f5740a5b50db2488cd4c932c00fd5b8324dad33bb6a67daf61a3d10e51b0e0c14fac249fd4d745b2c4dbb067b780111897fd561b9943e7047e2d1c95d97836df
@@ -40,7 +40,7 @@ type ButtonPropTypes = {
40
40
 
41
41
  const isValidEmoji = (emoji: string) => {
42
42
  // Using regular expression to check if the string is a valid emoji/emoji Unicode
43
- const emojiRegex = /^(\p{Emoji}|\uFE0F)+$/u;
43
+ const emojiRegex = /^(\p{Emoji}|\uFE0F|\u200D|\u20E3)+$/u;
44
44
  return emojiRegex.test(emoji);
45
45
  };
46
46
 
@@ -1,5 +1,5 @@
1
1
  <%= pb_rails("button", props: { count: 153, highlight: false, icon: "&#127881;", classname: "count", id: "reaction-button-highlight", variant: "reaction" }) %>
2
- <%= pb_rails("button", props: { count: 5, icon: "😍", variant: "reaction", margin_left: "lg" }) %>
2
+ <%= pb_rails("button", props: { count: 5, icon: "1️⃣", variant: "reaction", margin_left: "lg" }) %>
3
3
  <%= pb_rails("button", props: { variant: "reaction", margin_left: "lg" }) %>
4
4
  <%= pb_rails("button", props: { icon: "user", variant: "reaction", margin_left: "lg" }) %>
5
5
 
@@ -19,7 +19,7 @@ return (
19
19
  />
20
20
  <Button
21
21
  count={5}
22
- icon="😍"
22
+ icon="1️⃣"
23
23
  marginLeft='lg'
24
24
  tabIndex={0}
25
25
  variant="reaction"
@@ -106,7 +106,7 @@ const Icon = (props: IconProps) => {
106
106
 
107
107
  const isValidEmoji = (emoji: string) => {
108
108
  // Using regular expression to check if the string is a valid emoji/emoji Unicode
109
- const emojiRegex = /^(\p{Emoji}|\uFE0F)+$/u;
109
+ const emojiRegex = /^(\p{Emoji}|\uFE0F|\u200D|\u20E3)+$/u;
110
110
  return emojiRegex.test(emoji);
111
111
  };
112
112
 
@@ -1,9 +1,22 @@
1
- // Function is going over formattedData and returning all objects that match the
2
- // ID of the clicked item from the dropdown
1
+ //function to retrieve all ancestors of unchecked item and set checked to false
2
+ export const getAncestorsOfUnchecked = (
3
+ data: { [key: string]: any }[],
4
+ item: { [key: string]: any }
5
+ ) => {
6
+ if (item.parent_id) {
7
+ const ancestor = filterFormattedDataById(data, item.parent_id);
8
+ ancestor[0].checked = false;
9
+ ancestor[0].parent_id && getAncestorsOfUnchecked(data, ancestor[0]);
10
+ }
11
+ return data;
12
+ };
13
+
14
+ //function is going over formattedData and returning all objects that match the
15
+ //id of the clicked item from the dropdown
3
16
  export const filterFormattedDataById = (
4
17
  formattedData: { [key: string]: any }[],
5
18
  id: string
6
- ): { [key: string]: any }[] => {
19
+ ) => {
7
20
  const matched: { [key: string]: any }[] = [];
8
21
  const recursiveSearch = (data: { [key: string]: any }[], term: string) => {
9
22
  for (const item of data) {
@@ -25,7 +38,7 @@ export const filterFormattedDataById = (
25
38
  export const findByFilter = (
26
39
  formattedData: { [key: string]: any }[],
27
40
  searchTerm: string
28
- ): { [key: string]: any }[] => {
41
+ ) => {
29
42
  const matchedItems: { [key: string]: any }[] = [];
30
43
  const recursiveSearch = (data: { [key: string]: any }[], term: string) => {
31
44
  for (const item of data) {
@@ -43,20 +56,7 @@ export const findByFilter = (
43
56
  return matchedItems;
44
57
  };
45
58
 
46
- // Function to retrieve all ancestors of unchecked item and set checked to false
47
- export const getAncestorsOfUnchecked = (
48
- data: { [key: string]: any }[],
49
- item: { [key: string]: any }
50
- ): { [key: string]: any }[] => {
51
- if (item.parent_id) {
52
- const ancestor = filterFormattedDataById(data, item.parent_id);
53
- ancestor[0].checked = false;
54
- ancestor[0].parent_id && getAncestorsOfUnchecked(data, ancestor[0]);
55
- }
56
- return data;
57
- };
58
-
59
- // Function to get all items with checked = true
59
+ //function to get all items with checked = true
60
60
  export const getCheckedItems = (
61
61
  data: { [key: string]: any }[]
62
62
  ): { [key: string]: any }[] => {
@@ -76,9 +76,7 @@ export const getCheckedItems = (
76
76
  return checkedItems;
77
77
  };
78
78
 
79
- export const getDefaultCheckedItems = (
80
- treeData: { [key: string]: any }[]
81
- ): { [key: string]: any }[] => {
79
+ export const getDefaultCheckedItems = (treeData: { [key: string]: any }[]) => {
82
80
  const checkedDefault: { [key: string]: any }[] = [];
83
81
 
84
82
  const traverseTree = (items: { [key: string]: any }[]) => {
@@ -120,7 +118,7 @@ export const getDefaultCheckedItems = (
120
118
  export const recursiveCheckParent = (
121
119
  item: { [key: string]: any },
122
120
  data: any
123
- ): any => {
121
+ ) => {
124
122
  if (item.parent_id !== null) {
125
123
  const parent = filterFormattedDataById(data, item.parent_id);
126
124
  const allChildrenChecked = parent[0].children.every(
@@ -137,11 +135,8 @@ export const recursiveCheckParent = (
137
135
  return data;
138
136
  };
139
137
 
140
- export const getExpandedItems = (
141
- treeData: { [key: string]: string }[],
142
- selectedIds: string[]
143
- ): any[] => {
144
- const expandedItems: any[] = [];
138
+ export const getExpandedItems = (treeData: { [key: string]: string }[], selectedIds: string[]) => {
139
+ let expandedItems: any[] = [];
145
140
 
146
141
  const traverse = (items: string | any[], ancestors: any[] = []) => {
147
142
  for (let i = 0; i < items.length; i++) {
@@ -30,11 +30,10 @@
30
30
  align-items: center;
31
31
  justify-content: space-between;
32
32
  .input_inner_container {
33
- width: 100%;
33
+ max-width: 90%;
34
34
  }
35
35
 
36
36
  input {
37
- width: 100%;
38
37
  border: none;
39
38
  font-family: $font_family_base;
40
39
  font-size: $font_base;