@quillsql/react 1.6.8 → 1.7.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 (113) hide show
  1. package/lib/AddToDashboardModal.js +3 -3
  2. package/lib/AddToDashboardModal.js.map +1 -1
  3. package/lib/Chart.js +82 -145
  4. package/lib/Chart.js.map +1 -1
  5. package/lib/Context.d.ts +3 -3
  6. package/lib/Context.js +10 -20
  7. package/lib/Context.js.map +1 -1
  8. package/lib/Dashboard.js +34 -23
  9. package/lib/Dashboard.js.map +1 -1
  10. package/lib/QuillProvider.d.ts +2 -1
  11. package/lib/QuillProvider.js +2 -2
  12. package/lib/QuillProvider.js.map +1 -1
  13. package/lib/ReportBuilder.js +3 -3
  14. package/lib/ReportBuilder.js.map +1 -1
  15. package/lib/SQLEditor.js +3 -3
  16. package/lib/SQLEditor.js.map +1 -1
  17. package/lib/Table.js.map +1 -1
  18. package/lib/hooks/useQuill.js +3 -3
  19. package/lib/hooks/useQuill.js.map +1 -1
  20. package/package.json +24 -3
  21. package/rollup.config.ts +21 -0
  22. package/src/AddToDashboardModal.tsx +10 -3
  23. package/src/Chart.tsx +66 -195
  24. package/src/Context.tsx +10 -27
  25. package/src/Dashboard.tsx +38 -21
  26. package/src/QuillProvider.tsx +3 -0
  27. package/src/ReportBuilder.tsx +9 -3
  28. package/src/SQLEditor.tsx +9 -3
  29. package/src/Table.tsx +0 -1
  30. package/src/hooks/useQuill.ts +2 -1
  31. package/lib/AddToDashboardButton.d.ts +0 -1
  32. package/lib/AddToDashboardButton.js +0 -2
  33. package/lib/AddToDashboardButton.js.map +0 -1
  34. package/lib/AppContext.d.ts +0 -29
  35. package/lib/AppContext.js +0 -94
  36. package/lib/AppContext.js.map +0 -1
  37. package/lib/Button.d.ts +0 -26
  38. package/lib/Button.js +0 -151
  39. package/lib/Button.js.map +0 -1
  40. package/lib/ContextProvider.d.ts +0 -28
  41. package/lib/ContextProvider.js +0 -93
  42. package/lib/ContextProvider.js.map +0 -1
  43. package/lib/DateRangePicker.d.ts +0 -32
  44. package/lib/DateRangePicker.js +0 -105
  45. package/lib/DateRangePicker.js.map +0 -1
  46. package/lib/Dialog.d.ts +0 -68
  47. package/lib/Dialog.js +0 -407
  48. package/lib/Dialog.js.map +0 -1
  49. package/lib/Portal.d.ts +0 -32
  50. package/lib/Portal.js +0 -171
  51. package/lib/Portal.js.map +0 -1
  52. package/lib/Props.d.ts +0 -0
  53. package/lib/Props.js +0 -2
  54. package/lib/Props.js.map +0 -1
  55. package/lib/components/BigModal/Modal.d.ts +0 -14
  56. package/lib/components/BigModal/Modal.js +0 -109
  57. package/lib/components/BigModal/Modal.js.map +0 -1
  58. package/lib/components/Modal/Dropdown/Dropdown.d.ts +0 -12
  59. package/lib/components/Modal/Dropdown/Dropdown.js +0 -52
  60. package/lib/components/Modal/Dropdown/Dropdown.js.map +0 -1
  61. package/lib/components/Modal/Dropdown/DropdownItem.d.ts +0 -8
  62. package/lib/components/Modal/Dropdown/DropdownItem.js +0 -51
  63. package/lib/components/Modal/Dropdown/DropdownItem.js.map +0 -1
  64. package/lib/components/Modal/Dropdown/index.d.ts +0 -2
  65. package/lib/components/Modal/Dropdown/index.js +0 -3
  66. package/lib/components/Modal/Dropdown/index.js.map +0 -1
  67. package/lib/hooks/useSyncRefs.d.ts +0 -5
  68. package/lib/hooks/useSyncRefs.js +0 -38
  69. package/lib/hooks/useSyncRefs.js.map +0 -1
  70. package/lib/lib/colorClassNames.d.ts +0 -19
  71. package/lib/lib/colorClassNames.js +0 -3175
  72. package/lib/lib/colorClassNames.js.map +0 -1
  73. package/lib/lib/constants.d.ts +0 -16
  74. package/lib/lib/constants.js +0 -47
  75. package/lib/lib/constants.js.map +0 -1
  76. package/lib/lib/font.d.ts +0 -13
  77. package/lib/lib/font.js +0 -14
  78. package/lib/lib/font.js.map +0 -1
  79. package/lib/lib/hexColors.d.ts +0 -3
  80. package/lib/lib/hexColors.js +0 -29
  81. package/lib/lib/hexColors.js.map +0 -1
  82. package/lib/lib/index.d.ts +0 -3
  83. package/lib/lib/index.js +0 -4
  84. package/lib/lib/index.js.map +0 -1
  85. package/lib/lib/inputTypes.d.ts +0 -20
  86. package/lib/lib/inputTypes.js +0 -56
  87. package/lib/lib/inputTypes.js.map +0 -1
  88. package/lib/lib/shape.d.ts +0 -73
  89. package/lib/lib/shape.js +0 -74
  90. package/lib/lib/shape.js.map +0 -1
  91. package/lib/lib/sizing.d.ts +0 -46
  92. package/lib/lib/sizing.js +0 -43
  93. package/lib/lib/sizing.js.map +0 -1
  94. package/lib/lib/spacing.d.ts +0 -264
  95. package/lib/lib/spacing.js +0 -265
  96. package/lib/lib/spacing.js.map +0 -1
  97. package/lib/lib/theme.d.ts +0 -22
  98. package/lib/lib/theme.js +0 -46
  99. package/lib/lib/theme.js.map +0 -1
  100. package/lib/lib/utils.d.ts +0 -9
  101. package/lib/lib/utils.js +0 -40
  102. package/lib/lib/utils.js.map +0 -1
  103. package/lib/styles.css +0 -15795
  104. package/lib/types/Props.d.ts +0 -0
  105. package/lib/types/Props.js +0 -2
  106. package/lib/types/Props.js.map +0 -1
  107. package/lib/types.d.ts +0 -27
  108. package/lib/types.js +0 -6
  109. package/lib/types.js.map +0 -1
  110. package/src/lib/font.ts +0 -14
  111. package/src/lib/index.ts +0 -3
  112. package/src/lib/inputTypes.ts +0 -81
  113. package/src/lib/utils.tsx +0 -46
File without changes
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=Props.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Props.js","sourceRoot":"","sources":["../../src/types/Props.js"],"names":[],"mappings":""}
package/lib/types.d.ts DELETED
@@ -1,27 +0,0 @@
1
- import { ReactNode, ReactElement, JSXElementConstructor } from 'react';
2
- export type ReactTag = keyof JSX.IntrinsicElements | JSXElementConstructor<any>;
3
- declare let __: "1D45E01E-AF44-47C4-988A-19A94EBAF55C";
4
- export type __ = typeof __;
5
- export type Expand<T> = T extends infer O ? {
6
- [K in keyof O]: O[K];
7
- } : never;
8
- export type PropsOf<TTag extends ReactTag> = TTag extends React.ElementType ? Omit<React.ComponentProps<TTag>, 'ref'> : never;
9
- type PropsWeControl = 'as' | 'children' | 'refName' | 'className';
10
- type CleanProps<TTag extends ReactTag, TOmitableProps extends PropertyKey = never> = Omit<PropsOf<TTag>, TOmitableProps | PropsWeControl>;
11
- type OurProps<TTag extends ReactTag, TSlot> = {
12
- as?: TTag;
13
- children?: ReactNode | ((bag: TSlot) => ReactElement);
14
- refName?: string;
15
- };
16
- type HasProperty<T extends object, K extends PropertyKey> = T extends never ? never : K extends keyof T ? true : never;
17
- type ClassNameOverride<TTag extends ReactTag, TSlot = {}> = true extends HasProperty<PropsOf<TTag>, 'className'> ? {
18
- className?: PropsOf<TTag>['className'] | ((bag: TSlot) => string);
19
- } : {};
20
- export type Props<TTag extends ReactTag, TSlot = {}, TOmitableProps extends PropertyKey = never, Overrides = {}> = CleanProps<TTag, TOmitableProps | keyof Overrides> & OurProps<TTag, TSlot> & ClassNameOverride<TTag, TSlot> & Overrides;
21
- type Without<T, U> = {
22
- [P in Exclude<keyof T, keyof U>]?: never;
23
- };
24
- export type XOR<T, U> = T | U extends __ ? never : T extends __ ? U : U extends __ ? T : T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
25
- export type ByComparator<T> = (T extends null ? string : keyof T & string) | ((a: T, b: T) => boolean);
26
- export type EnsureArray<T> = T extends any[] ? T : Expand<T>[];
27
- export {};
package/lib/types.js DELETED
@@ -1,6 +0,0 @@
1
- // A unique placeholder we can use as a default. This is nice because we can use this instead of
2
- // defaulting to null / never / ... and possibly collide with actual data.
3
- // Ideally we use a unique symbol here.
4
- var __ = '1D45E01E-AF44-47C4-988A-19A94EBAF55C';
5
- export {};
6
- //# sourceMappingURL=types.js.map
package/lib/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,gGAAgG;AAChG,0EAA0E;AAC1E,uCAAuC;AACvC,IAAI,EAAE,GAAG,sCAA+C,CAAC"}
package/src/lib/font.ts DELETED
@@ -1,14 +0,0 @@
1
- export const fontSize = {
2
- xs: 'qq-text-xs',
3
- sm: 'qq-text-sm',
4
- md: 'qq-text-base',
5
- lg: 'qq-text-lg',
6
- xl: 'qq-text-xl',
7
- threeXl: 'qq-text-3xl',
8
- };
9
-
10
- export const fontWeight = {
11
- sm: 'qq-font-normal',
12
- md: 'qq-font-medium',
13
- lg: 'qq-font-semibold',
14
- };
package/src/lib/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './inputTypes';
2
- export * from './font';
3
- export * from './utils';
@@ -1,81 +0,0 @@
1
- export type ValueFormatter = {
2
- (value: number): string;
3
- };
4
-
5
- const iconVariantValues = [
6
- 'simple',
7
- 'light',
8
- 'shadow',
9
- 'solid',
10
- 'outlined',
11
- ] as const;
12
-
13
- export type IconVariant = (typeof iconVariantValues)[number];
14
-
15
- export type HorizontalPosition = 'left' | 'right';
16
-
17
- export type VerticalPosition = 'top' | 'bottom';
18
-
19
- export type ButtonVariant = 'primary' | 'secondary' | 'light';
20
-
21
- const deltaTypeValues = [
22
- 'increase',
23
- 'moderateIncrease',
24
- 'decrease',
25
- 'moderateDecrease',
26
- 'unchanged',
27
- ] as const;
28
-
29
- export type DeltaType = (typeof deltaTypeValues)[number];
30
-
31
- const sizeValues = ['xs', 'sm', 'md', 'lg', 'xl'] as const;
32
-
33
- export type Size = (typeof sizeValues)[number];
34
-
35
- const colorValues = [
36
- 'slate',
37
- 'gray',
38
- 'zinc',
39
- 'neutral',
40
- 'stone',
41
- 'red',
42
- 'orange',
43
- 'amber',
44
- 'yellow',
45
- 'lime',
46
- 'green',
47
- 'emerald',
48
- 'teal',
49
- 'cyan',
50
- 'sky',
51
- 'blue',
52
- 'indigo',
53
- 'violet',
54
- 'purple',
55
- 'fuchsia',
56
- 'pink',
57
- 'rose',
58
- ] as const;
59
-
60
- export type Color = (typeof colorValues)[number];
61
-
62
- const justifyContentValues = [
63
- 'start',
64
- 'end',
65
- 'center',
66
- 'between',
67
- 'around',
68
- 'evenly',
69
- ] as const;
70
- export type JustifyContent = (typeof justifyContentValues)[number];
71
-
72
- const alignItemsValues = [
73
- 'start',
74
- 'end',
75
- 'center',
76
- 'baseline',
77
- 'stretch',
78
- ] as const;
79
- export type AlignItems = (typeof alignItemsValues)[number];
80
-
81
- export type FlexDirection = 'row' | 'col' | 'row-reverse' | 'col-reverse';
package/src/lib/utils.tsx DELETED
@@ -1,46 +0,0 @@
1
- import { ValueFormatter } from './inputTypes';
2
-
3
- export const defaultValueFormatter: ValueFormatter = (value: number) =>
4
- value.toString();
5
-
6
- export const sumNumericArray = (arr: number[]) =>
7
- arr.reduce((prefixSum, num) => prefixSum + num, 0);
8
-
9
- export const removeValueFromArray = (value: any, array: any[]): any[] => {
10
- const index = array.indexOf(value);
11
- if (index > -1) {
12
- array.splice(index, 1);
13
- }
14
- return array;
15
- };
16
-
17
- export const isValueInArray = (value: any, array: any[]): boolean => {
18
- for (let i = 0; i < array.length; i++) {
19
- if (array[i] === value) {
20
- return true;
21
- }
22
- }
23
- return false;
24
- };
25
-
26
- export const stringIsNumeric = (str: string | undefined): boolean => {
27
- return !isNaN(Number(str)) && str !== undefined;
28
- };
29
-
30
- export const stringEndsWithNumber = (str: string): boolean => {
31
- return stringIsNumeric(str.split('-').pop());
32
- };
33
-
34
- export function mergeRefs<T = any>(
35
- refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>
36
- ): React.RefCallback<T> {
37
- return value => {
38
- refs.forEach(ref => {
39
- if (typeof ref === 'function') {
40
- ref(value);
41
- } else if (ref != null) {
42
- (ref as React.MutableRefObject<T | null>).current = value;
43
- }
44
- });
45
- };
46
- }