playbook_ui 13.8.0.pre.alpha.play845allkitsbytypes1258 → 13.9.0.pre.alpha.PLAY962SingleSelect1261

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: e5c8dbe877503d2a312add43c4ee5319192494aef32945e9a7c2f32dc254ad9d
4
- data.tar.gz: 62a00cbb99b842e8a348dd33da90bedaac35ecc5fff1afc167f882014ef8d76c
3
+ metadata.gz: bbbb7405fff8ba7bff61edf5ab1b7a454b62f10fbf0ce7373a053dd7e938fd41
4
+ data.tar.gz: 88cf1a1646d62f2633ff8b49905dfb7ffab11faea0466627d644016892be5b73
5
5
  SHA512:
6
- metadata.gz: 291bc413c5067b82944b7559d216f42a14aba1eb7a750db833c26fc0de76ea8dba1945e71022bc80c104eef3dfc391af8c82de6c0e31673b338625b1b495cbcf
7
- data.tar.gz: 1a4abac14b519af6c39bbcb1a769ff6c7bfc41d6eee534d319fa7716fa2666d7dcc19df39749994853da9a0ac15704dc4ab52500f484f1b1c96622d2d13de846
6
+ metadata.gz: 27dd8117514678def0ba2ae25d01e52dd731af744bfeaafc13ae53166604ec41403b513943ea2f9217e3c72c63d23b7b9b8c625dfe2180837ec86c01586be4c0
7
+ data.tar.gz: 84fd12d4ed1dd1e67a6bb3a8dc4e9f96fd2f67272048a6f7d0ed686fc1caac9851f254686391b2abae25237e5f6cdd4bf49520c46a424a253a766d1d98b402c5
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildAriaProps, buildDataProps } from '../utilities/props'
4
4
  import { GlobalProps, globalProps } from '../utilities/globalProps'
5
+ import { isValidEmoji } from '../utilities/validEmojiChecker'
5
6
 
6
7
  import Icon from '../pb_icon/_icon'
7
8
  import Caption from "../pb_caption/_caption"
@@ -38,12 +39,6 @@ type ButtonPropTypes = {
38
39
  wrapperClass?: string,
39
40
  } & GlobalProps
40
41
 
41
- const isValidEmoji = (emoji: string) => {
42
- // Using regular expression to check if the string is a valid emoji/emoji Unicode
43
- const emojiRegex = /^(\p{Emoji}|\uFE0F)+$/u;
44
- return emojiRegex.test(emoji);
45
- };
46
-
47
42
  const buttonClassName = (props: ButtonPropTypes) => {
48
43
  const {
49
44
  disabled = false,
@@ -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"
@@ -2,6 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { buildAriaProps, buildDataProps } from '../utilities/props'
4
4
  import { GlobalProps, globalProps } from '../utilities/globalProps'
5
+ import { isValidEmoji } from '../utilities/validEmojiChecker'
5
6
 
6
7
  export type IconSizes = "lg"
7
8
  | "xs"
@@ -104,13 +105,6 @@ const Icon = (props: IconProps) => {
104
105
  const ariaProps: {[key: string]: any} = buildAriaProps(aria)
105
106
  const dataProps: {[key: string]: any} = buildDataProps(data)
106
107
 
107
- const isValidEmoji = (emoji: string) => {
108
- // Using regular expression to check if the string is a valid emoji/emoji Unicode
109
- const emojiRegex = /^(\p{Emoji}|\uFE0F)+$/u;
110
- return emojiRegex.test(emoji);
111
- };
112
-
113
-
114
108
  // Add a conditional here to show only the SVG if custom
115
109
  const displaySVG = (customIcon: any) => {
116
110
  if (customIcon)
@@ -6,6 +6,7 @@
6
6
 
7
7
  .content_wrapper {
8
8
  width: 100%;
9
+ font-size: $font_base - 1;
9
10
 
10
11
  .pull-left {
11
12
  margin-left: $space-xs;
@@ -1,22 +1,9 @@
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
1
+ // Function is going over formattedData and returning all objects that match the
2
+ // ID of the clicked item from the dropdown
16
3
  export const filterFormattedDataById = (
17
4
  formattedData: { [key: string]: any }[],
18
5
  id: string
19
- ) => {
6
+ ): { [key: string]: any }[] => {
20
7
  const matched: { [key: string]: any }[] = [];
21
8
  const recursiveSearch = (data: { [key: string]: any }[], term: string) => {
22
9
  for (const item of data) {
@@ -38,7 +25,7 @@ export const filterFormattedDataById = (
38
25
  export const findByFilter = (
39
26
  formattedData: { [key: string]: any }[],
40
27
  searchTerm: string
41
- ) => {
28
+ ): { [key: string]: any }[] => {
42
29
  const matchedItems: { [key: string]: any }[] = [];
43
30
  const recursiveSearch = (data: { [key: string]: any }[], term: string) => {
44
31
  for (const item of data) {
@@ -56,7 +43,20 @@ export const findByFilter = (
56
43
  return matchedItems;
57
44
  };
58
45
 
59
- //function to get all items with checked = true
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
60
60
  export const getCheckedItems = (
61
61
  data: { [key: string]: any }[]
62
62
  ): { [key: string]: any }[] => {
@@ -76,7 +76,9 @@ export const getCheckedItems = (
76
76
  return checkedItems;
77
77
  };
78
78
 
79
- export const getDefaultCheckedItems = (treeData: { [key: string]: any }[]) => {
79
+ export const getDefaultCheckedItems = (
80
+ treeData: { [key: string]: any }[]
81
+ ): { [key: string]: any }[] => {
80
82
  const checkedDefault: { [key: string]: any }[] = [];
81
83
 
82
84
  const traverseTree = (items: { [key: string]: any }[]) => {
@@ -118,7 +120,7 @@ export const getDefaultCheckedItems = (treeData: { [key: string]: any }[]) => {
118
120
  export const recursiveCheckParent = (
119
121
  item: { [key: string]: any },
120
122
  data: any
121
- ) => {
123
+ ): any => {
122
124
  if (item.parent_id !== null) {
123
125
  const parent = filterFormattedDataById(data, item.parent_id);
124
126
  const allChildrenChecked = parent[0].children.every(
@@ -135,8 +137,11 @@ export const recursiveCheckParent = (
135
137
  return data;
136
138
  };
137
139
 
138
- export const getExpandedItems = (treeData: { [key: string]: string }[], selectedIds: string[]) => {
139
- let expandedItems: any[] = [];
140
+ export const getExpandedItems = (
141
+ treeData: { [key: string]: string }[],
142
+ selectedIds: string[]
143
+ ): any[] => {
144
+ const expandedItems: any[] = [];
140
145
 
141
146
  const traverse = (items: string | any[], ancestors: any[] = []) => {
142
147
  for (let i = 0; i < items.length; i++) {
@@ -30,10 +30,11 @@
30
30
  align-items: center;
31
31
  justify-content: space-between;
32
32
  .input_inner_container {
33
- max-width: 90%;
33
+ width: 100%;
34
34
  }
35
35
 
36
36
  input {
37
+ width: 100%;
37
38
  border: none;
38
39
  font-family: $font_family_base;
39
40
  font-size: $font_base;