@dartech/arsenal-ui 0.0.1 → 0.0.3

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 (214) hide show
  1. package/{index.ts → index.d.ts} +3 -3
  2. package/index.esm.js +1 -0
  3. package/index.umd.js +1 -0
  4. package/package.json +5 -2
  5. package/src/interfaces/common.d.ts +10 -0
  6. package/src/interfaces/definition.d.ts +117 -0
  7. package/src/interfaces/{index.ts → index.d.ts} +3 -3
  8. package/src/interfaces/ui.d.ts +33 -0
  9. package/src/lib/Alert/Alert.d.ts +53 -0
  10. package/src/lib/Alert/index.d.ts +1 -0
  11. package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +11 -0
  12. package/src/lib/Definition/CreateDefinition/{index.ts → index.d.ts} +1 -1
  13. package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +8 -0
  14. package/src/lib/Definition/DefinitionFiller/WidgetDefinitionFiller.d.ts +9 -0
  15. package/src/lib/Definition/DefinitionFiller/{index.ts → index.d.ts} +2 -2
  16. package/src/lib/Definition/{index.ts → index.d.ts} +2 -2
  17. package/src/lib/DemPropertyField/DemPropertyField.d.ts +59 -0
  18. package/src/lib/DemPropertyField/DemPropertyView/DemPropertyView.d.ts +8 -0
  19. package/src/lib/DemPropertyField/DemPropertyView/{index.ts → index.d.ts} +1 -1
  20. package/src/lib/DemPropertyField/MultipleDemField/MultipleDemField.d.ts +9 -0
  21. package/src/lib/DemPropertyField/MultipleDemField/{index.tsx → index.d.ts} +1 -1
  22. package/src/lib/DemPropertyField/RestrictedValuesEditor.d.ts +6 -0
  23. package/src/lib/DemPropertyField/SingleDemField/SingleDemField.d.ts +9 -0
  24. package/src/lib/DemPropertyField/SingleDemField/{index.ts → index.d.ts} +1 -1
  25. package/src/lib/DemPropertyField/{index.ts → index.d.ts} +2 -2
  26. package/src/lib/DemPropertyField/styles.d.ts +2 -0
  27. package/src/lib/DemPropertyField/widgets/DemBooleanWidget.d.ts +7 -0
  28. package/src/lib/DemPropertyField/widgets/DemDateTimeWidget.d.ts +9 -0
  29. package/src/lib/DemPropertyField/widgets/DemDateWidget.d.ts +9 -0
  30. package/src/lib/DemPropertyField/widgets/DemFieldWidget.d.ts +11 -0
  31. package/src/lib/DemPropertyField/widgets/DemFloatWidget.d.ts +10 -0
  32. package/src/lib/DemPropertyField/widgets/DemIntegerWidget.d.ts +10 -0
  33. package/src/lib/DemPropertyField/widgets/DemJsonWidget.d.ts +9 -0
  34. package/src/lib/DemPropertyField/widgets/DemStringWidget.d.ts +10 -0
  35. package/src/lib/DemPropertyField/widgets/DemTimeWidget.d.ts +9 -0
  36. package/src/lib/DemPropertyField/widgets/{index.ts → index.d.ts} +1 -1
  37. package/src/lib/Forms/BackButton.d.ts +7 -0
  38. package/src/lib/Forms/ControlAceEditor.d.ts +20 -0
  39. package/src/lib/Forms/ControlAutocomplete.d.ts +49 -0
  40. package/src/lib/Forms/ControlCheckbox.d.ts +30 -0
  41. package/src/lib/Forms/ControlDebouncedInput.d.ts +4 -0
  42. package/src/lib/Forms/ControlInput.d.ts +54 -0
  43. package/src/lib/Forms/ControlNumberInput.d.ts +43 -0
  44. package/src/lib/Forms/ControlQueryAutocomplete.d.ts +7 -0
  45. package/src/lib/Forms/ControlRadioBtn.d.ts +26 -0
  46. package/src/lib/Forms/ControlSelect.d.ts +66 -0
  47. package/src/lib/Forms/CopyButton.d.ts +21 -0
  48. package/src/lib/Forms/{index.ts → index.d.ts} +11 -10
  49. package/src/lib/InfoItem/InfoItem.d.ts +10 -0
  50. package/src/lib/InfoItem/{index.ts → index.d.ts} +1 -1
  51. package/src/lib/InfoItem/styles.d.ts +2 -0
  52. package/src/lib/JsonPathPicker/JsonPathPicker.d.ts +10 -0
  53. package/src/lib/JsonPathPicker/PropertyStep.d.ts +11 -0
  54. package/src/lib/JsonPathPicker/{index.ts → index.d.ts} +1 -1
  55. package/src/lib/JsonView/JsonView.d.ts +9 -0
  56. package/src/lib/JsonView/{index.ts → index.d.ts} +1 -1
  57. package/src/lib/Loader/Loader.d.ts +21 -0
  58. package/src/lib/Loader/{index.ts → index.d.ts} +1 -1
  59. package/src/lib/Modals/JsonModalView.d.ts +10 -0
  60. package/src/lib/Modals/{index.ts → index.d.ts} +1 -1
  61. package/src/lib/Property/PropertyValueField/BooleanValueField.d.ts +7 -0
  62. package/src/lib/Property/PropertyValueField/DateTimeValueField.d.ts +9 -0
  63. package/src/lib/Property/PropertyValueField/DateValueField.d.ts +9 -0
  64. package/src/lib/Property/PropertyValueField/EntityValueField.d.ts +9 -0
  65. package/src/lib/Property/PropertyValueField/JsonValueField.d.ts +10 -0
  66. package/src/lib/Property/PropertyValueField/PropertyValue.d.ts +10 -0
  67. package/src/lib/Property/PropertyValueField/PropertyValueField.d.ts +9 -0
  68. package/src/lib/Property/PropertyValueField/StringValueField.d.ts +9 -0
  69. package/src/lib/Property/PropertyValueField/TimeValueField.d.ts +9 -0
  70. package/src/lib/Property/PropertyValueField/ValueComponent.d.ts +15 -0
  71. package/src/lib/Property/PropertyValueField/{index.ts → index.d.ts} +2 -1
  72. package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +9 -0
  73. package/src/lib/Property/PropertyWidget/{index.ts → index.d.ts} +1 -1
  74. package/src/lib/Property/UpsertProperty/CreatePropertiesList.d.ts +13 -0
  75. package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +10 -0
  76. package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +7 -0
  77. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +6 -0
  78. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +7 -0
  79. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +8 -0
  80. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +6 -0
  81. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +10 -0
  82. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +6 -0
  83. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/{index.ts → index.d.ts} +1 -1
  84. package/src/lib/Property/UpsertProperty/{index.ts → index.d.ts} +2 -2
  85. package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +6 -0
  86. package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +8 -0
  87. package/src/lib/Property/ViewPropertiesList/{index.ts → index.d.ts} +1 -1
  88. package/src/lib/Property/ViewProperty/EntityPropertiesShortView.d.ts +9 -0
  89. package/src/lib/Property/ViewProperty/EntityPropertiesView.d.ts +8 -0
  90. package/src/lib/Property/ViewProperty/PropertyDataTable.d.ts +7 -0
  91. package/src/lib/Property/ViewProperty/PropertyItem.d.ts +9 -0
  92. package/src/lib/Property/ViewProperty/ViewProperty.d.ts +9 -0
  93. package/src/lib/Property/ViewProperty/{index.ts → index.d.ts} +1 -1
  94. package/src/lib/Property/{index.ts → index.d.ts} +4 -4
  95. package/src/lib/Status/Status.d.ts +7 -0
  96. package/src/lib/Status/{index.ts → index.d.ts} +1 -1
  97. package/src/lib/Status/styles.d.ts +2 -0
  98. package/src/lib/StepperView/StepperView.d.ts +10 -0
  99. package/src/lib/StepperView/index.d.ts +1 -0
  100. package/src/lib/Table/Table.d.ts +49 -0
  101. package/src/lib/Table/TableColumnMenu.d.ts +3 -0
  102. package/src/lib/Table/TablePagination.d.ts +3 -0
  103. package/src/lib/Table/index.d.ts +1 -0
  104. package/src/lib/Table/styles.d.ts +2 -0
  105. package/src/lib/Table/usePagination.d.ts +5 -0
  106. package/src/lib/Table/useTableQueryPagination.d.ts +11 -0
  107. package/src/lib/Table/useTableQuerySorting.d.ts +6 -0
  108. package/src/lib/Tabs/RouteTabs.d.ts +11 -0
  109. package/src/lib/Tabs/TabPanel.d.ts +25 -0
  110. package/src/lib/Tabs/{index.ts → index.d.ts} +2 -2
  111. package/src/lib/TemplateContent/ExpressionDecorator.d.ts +5 -0
  112. package/src/lib/TemplateContent/TemplateContentEditor.d.ts +9 -0
  113. package/src/lib/TemplateContent/{index.ts → index.d.ts} +1 -1
  114. package/src/lib/{index.ts → index.d.ts} +15 -14
  115. package/src/utils/common.d.ts +7 -0
  116. package/src/utils/dem.d.ts +7 -0
  117. package/src/utils/hooks.d.ts +7 -0
  118. package/src/utils/{index.ts → index.d.ts} +5 -5
  119. package/src/utils/ui-utils.d.ts +7 -0
  120. package/src/utils/validators.d.ts +12 -0
  121. package/.babelrc +0 -12
  122. package/.eslintrc.json +0 -22
  123. package/jest.config.js +0 -9
  124. package/project.json +0 -69
  125. package/rollup.config.js +0 -135
  126. package/src/interfaces/common.ts +0 -12
  127. package/src/interfaces/definition.ts +0 -143
  128. package/src/interfaces/ui.ts +0 -35
  129. package/src/lib/Alert/Alert.tsx +0 -108
  130. package/src/lib/Alert/index.ts +0 -1
  131. package/src/lib/Definition/CreateDefinition/CreateDefinition.tsx +0 -74
  132. package/src/lib/Definition/DefinitionFiller/DefinitionFiller.tsx +0 -85
  133. package/src/lib/Definition/DefinitionFiller/WidgetDefinitionFiller.tsx +0 -96
  134. package/src/lib/DemPropertyField/DemPropertyField.tsx +0 -93
  135. package/src/lib/DemPropertyField/DemPropertyView/DemPropertyView.tsx +0 -44
  136. package/src/lib/DemPropertyField/MultipleDemField/MultipleDemField.tsx +0 -293
  137. package/src/lib/DemPropertyField/RestrictedValuesEditor.tsx +0 -63
  138. package/src/lib/DemPropertyField/SingleDemField/SingleDemField.tsx +0 -156
  139. package/src/lib/DemPropertyField/styles.ts +0 -50
  140. package/src/lib/DemPropertyField/widgets/DemBooleanWidget.tsx +0 -26
  141. package/src/lib/DemPropertyField/widgets/DemDateTimeWidget.tsx +0 -34
  142. package/src/lib/DemPropertyField/widgets/DemDateWidget.tsx +0 -33
  143. package/src/lib/DemPropertyField/widgets/DemFieldWidget.tsx +0 -67
  144. package/src/lib/DemPropertyField/widgets/DemFloatWidget.tsx +0 -49
  145. package/src/lib/DemPropertyField/widgets/DemIntegerWidget.tsx +0 -63
  146. package/src/lib/DemPropertyField/widgets/DemJsonWidget.tsx +0 -33
  147. package/src/lib/DemPropertyField/widgets/DemStringWidget.tsx +0 -35
  148. package/src/lib/DemPropertyField/widgets/DemTimeWidget.tsx +0 -46
  149. package/src/lib/Forms/BackButton.tsx +0 -45
  150. package/src/lib/Forms/ControlAceEditor.tsx +0 -103
  151. package/src/lib/Forms/ControlAutocomplete.tsx +0 -134
  152. package/src/lib/Forms/ControlCheckbox.tsx +0 -57
  153. package/src/lib/Forms/ControlDebouncedInput.tsx +0 -69
  154. package/src/lib/Forms/ControlInput.tsx +0 -102
  155. package/src/lib/Forms/ControlNumberInput.tsx +0 -144
  156. package/src/lib/Forms/ControlRadioBtn.tsx +0 -46
  157. package/src/lib/Forms/ControlSelect.tsx +0 -135
  158. package/src/lib/Forms/CopyButton.tsx +0 -49
  159. package/src/lib/InfoItem/InfoItem.tsx +0 -39
  160. package/src/lib/InfoItem/styles.ts +0 -17
  161. package/src/lib/JsonPathPicker/JsonPathPicker.tsx +0 -71
  162. package/src/lib/JsonPathPicker/PropertyStep.tsx +0 -74
  163. package/src/lib/JsonView/JsonView.tsx +0 -43
  164. package/src/lib/Loader/Loader.tsx +0 -41
  165. package/src/lib/Modals/JsonModalView.tsx +0 -52
  166. package/src/lib/Property/PropertyValueField/BooleanValueField.tsx +0 -41
  167. package/src/lib/Property/PropertyValueField/DateTimeValueField.tsx +0 -59
  168. package/src/lib/Property/PropertyValueField/DateValueField.tsx +0 -59
  169. package/src/lib/Property/PropertyValueField/EntityValueField.tsx +0 -33
  170. package/src/lib/Property/PropertyValueField/JsonValueField.tsx +0 -64
  171. package/src/lib/Property/PropertyValueField/PropertyValue.tsx +0 -97
  172. package/src/lib/Property/PropertyValueField/PropertyValueField.tsx +0 -86
  173. package/src/lib/Property/PropertyValueField/StringValueField.tsx +0 -21
  174. package/src/lib/Property/PropertyValueField/TimeValueField.tsx +0 -68
  175. package/src/lib/Property/PropertyValueField/ValueComponent.tsx +0 -63
  176. package/src/lib/Property/PropertyWidget/PropertyWidget.tsx +0 -167
  177. package/src/lib/Property/UpsertProperty/CreatePropertiesList.tsx +0 -131
  178. package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.tsx +0 -147
  179. package/src/lib/Property/UpsertProperty/CustomPropertyField.tsx +0 -40
  180. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.tsx +0 -41
  181. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.tsx +0 -27
  182. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.tsx +0 -133
  183. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.tsx +0 -46
  184. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.tsx +0 -52
  185. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.tsx +0 -98
  186. package/src/lib/Property/UpsertProperty/useCustomFields.ts +0 -22
  187. package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.tsx +0 -50
  188. package/src/lib/Property/ViewProperty/EntityPropertiesShortView.tsx +0 -41
  189. package/src/lib/Property/ViewProperty/EntityPropertiesView.tsx +0 -48
  190. package/src/lib/Property/ViewProperty/PropertyDataTable.tsx +0 -139
  191. package/src/lib/Property/ViewProperty/PropertyItem.tsx +0 -46
  192. package/src/lib/Property/ViewProperty/ViewProperty.tsx +0 -52
  193. package/src/lib/Status/Status.tsx +0 -15
  194. package/src/lib/Status/styles.ts +0 -14
  195. package/src/lib/Table/Table.tsx +0 -116
  196. package/src/lib/Table/TableColumnMenu.tsx +0 -12
  197. package/src/lib/Table/TablePagination.tsx +0 -42
  198. package/src/lib/Table/index.ts +0 -1
  199. package/src/lib/Table/styles.ts +0 -59
  200. package/src/lib/Table/usePagination.ts +0 -15
  201. package/src/lib/Table/useTableQueryPagination.ts +0 -49
  202. package/src/lib/Table/useTableQuerySorting.ts +0 -52
  203. package/src/lib/Tabs/RouteTabs.tsx +0 -54
  204. package/src/lib/Tabs/TabPanel.tsx +0 -42
  205. package/src/lib/TemplateContent/ExpressionDecorator.tsx +0 -7
  206. package/src/lib/TemplateContent/TemplateContentEditor.tsx +0 -144
  207. package/src/utils/common.ts +0 -68
  208. package/src/utils/dem.ts +0 -78
  209. package/src/utils/hooks.ts +0 -41
  210. package/src/utils/ui-utils.tsx +0 -71
  211. package/src/utils/validators.ts +0 -130
  212. package/tsconfig.json +0 -24
  213. package/tsconfig.lib.json +0 -22
  214. package/tsconfig.spec.json +0 -19
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ /**
3
+ * This interface is referencing the [[TabPanel]] component props.
4
+ * @category Common UI components
5
+ */
6
+ export interface TabPanelProps {
7
+ /**
8
+ * Active tab value
9
+ */
10
+ value: number | string;
11
+ /**
12
+ * Index of current panel
13
+ */
14
+ index: number | string;
15
+ /**
16
+ * Rendered children component
17
+ */
18
+ children: React.ReactElement;
19
+ }
20
+ /**
21
+ * Tab panel component. Used with tabs component
22
+ * @category Common UI components
23
+ */
24
+ export declare const TabPanel: (props: TabPanelProps) => JSX.Element;
25
+ export default TabPanel;
@@ -1,2 +1,2 @@
1
- export * from './TabPanel';
2
- export * from './RouteTabs';
1
+ export * from './TabPanel';
2
+ export * from './RouteTabs';
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const ExpressionDecorator: ({ children }: {
3
+ children: any;
4
+ }) => JSX.Element;
5
+ export default ExpressionDecorator;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { JsonPathPickerProperties } from '../../interfaces';
3
+ declare type Props = {
4
+ fieldName: string;
5
+ getProperties?: () => JsonPathPickerProperties;
6
+ initialText?: string;
7
+ };
8
+ export declare const TemplateContentEditor: ({ fieldName, getProperties, initialText }: Props) => JSX.Element;
9
+ export default TemplateContentEditor;
@@ -1 +1 @@
1
- export * from './TemplateContentEditor';
1
+ export * from './TemplateContentEditor';
@@ -1,14 +1,15 @@
1
- export * from './Alert';
2
- export * from './Forms';
3
- export * from './Loader';
4
- export * from './Table';
5
- export * from './Tabs';
6
- export * from './DemPropertyField';
7
- export * from './Modals';
8
- export * from './InfoItem';
9
- export * from './Definition';
10
- export * from './Property';
11
- export * from './Status';
12
- export * from './JsonView';
13
- export * from './JsonPathPicker';
14
- export * from './TemplateContent';
1
+ export * from './Alert';
2
+ export * from './Forms';
3
+ export * from './Loader';
4
+ export * from './Table';
5
+ export * from './Tabs';
6
+ export * from './DemPropertyField';
7
+ export * from './Modals';
8
+ export * from './InfoItem';
9
+ export * from './Definition';
10
+ export * from './Property';
11
+ export * from './Status';
12
+ export * from './JsonView';
13
+ export * from './JsonPathPicker';
14
+ export * from './TemplateContent';
15
+ export * from './StepperView';
@@ -0,0 +1,7 @@
1
+ export declare const removeArrayItem: (arr: Array<unknown>, index: number) => unknown[];
2
+ export declare const validateJson: (value: string) => boolean;
3
+ export declare function capitalize(str: string): string;
4
+ export declare const sortArrayOfObjects: (a: any, b: any, key: string, order?: string) => 1 | -1 | 0;
5
+ export declare const getJsonStringValue: (value: unknown) => string;
6
+ export declare const safeParseJson: (value: string) => any;
7
+ export declare const deepParseJson: (value: string) => any;
@@ -0,0 +1,7 @@
1
+ import { EntityTypeProperty } from '../interfaces';
2
+ export declare const isExpression: (value: unknown) => boolean;
3
+ export declare function propertiesObjectToArray(properties: any, fields?: {
4
+ [key: string]: unknown;
5
+ }): any[];
6
+ export declare const getDemPropertyDateFormat: (defaultFormat: string, propertyFormat: string) => string;
7
+ export declare const getEntityStarterValue: (property: EntityTypeProperty) => any;
@@ -0,0 +1,7 @@
1
+ export declare function useDebounce(func: (args?: any) => void, delay: number): (...args: any[]) => void;
2
+ export declare const useToggle: () => {
3
+ open: boolean;
4
+ toggle: () => void;
5
+ onClose: () => void;
6
+ onOpen: () => void;
7
+ };
@@ -1,5 +1,5 @@
1
- export * from './common';
2
- export * from './ui-utils';
3
- export * from './hooks';
4
- export * from './validators';
5
- export * from './dem';
1
+ export * from './common';
2
+ export * from './ui-utils';
3
+ export * from './hooks';
4
+ export * from './validators';
5
+ export * from './dem';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { TableDataType } from '../interfaces';
3
+ export declare const formatTableRowValue: ({ value, type, copyText, }: {
4
+ value: unknown;
5
+ type?: TableDataType;
6
+ copyText?: string;
7
+ }) => JSX.Element | "";
@@ -0,0 +1,12 @@
1
+ import { PropertyType } from '../interfaces';
2
+ export declare const digitsOnly: RegExp;
3
+ export declare const floatsOnly: RegExp;
4
+ declare type ValidationResult = {
5
+ valid: boolean;
6
+ message?: string;
7
+ continuable?: boolean;
8
+ displayOnChange?: boolean;
9
+ };
10
+ export declare function validateInteger(value: string, type: PropertyType): ValidationResult;
11
+ export declare function validateFloat(value: string): ValidationResult;
12
+ export {};
package/.babelrc DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "presets": [
3
- [
4
- "@nrwl/react/babel",
5
- {
6
- "runtime": "automatic",
7
- "useBuiltIns": "usage"
8
- }
9
- ]
10
- ],
11
- "plugins": []
12
- }
package/.eslintrc.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
- "parserOptions": {
8
- "sourceType": "module",
9
- "allowImportExportEverywhere": true
10
- },
11
- "rules": {}
12
- },
13
- {
14
- "files": ["*.ts", "*.tsx"],
15
- "rules": {}
16
- },
17
- {
18
- "files": ["*.js", "*.jsx"],
19
- "rules": {}
20
- }
21
- ]
22
- }
package/jest.config.js DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- displayName: 'arsenal-ui',
3
- preset: '../../jest.preset.js',
4
- transform: {
5
- '^.+\\.[tj]sx?$': 'babel-jest',
6
- },
7
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
8
- coverageDirectory: '../../coverage/libs/arsenal-ui',
9
- };
package/project.json DELETED
@@ -1,69 +0,0 @@
1
- {
2
- "root": "libs/arsenal-ui",
3
- "sourceRoot": "libs/arsenal-ui/src",
4
- "projectType": "library",
5
- "tags": [],
6
- "targets": {
7
- "build": {
8
- "executor": "@nrwl/web:rollup",
9
- "outputs": ["{options.outputPath}"],
10
- "options": {
11
- "outputPath": "dist/libs/arsenal-ui",
12
- "tsConfig": "libs/arsenal-ui/tsconfig.lib.json",
13
- "project": "libs/arsenal-ui/package.json",
14
- "entryFile": "libs/arsenal-ui/index.ts",
15
- "rollupConfig": "libs/arsenal-ui/rollup.config",
16
- "external": [
17
- "react",
18
- "react/jsx-runtime",
19
- "axios",
20
- "url-join",
21
- "dmn-js",
22
- "jspdf",
23
- "canvg",
24
- "react-toastify",
25
- "react-router-dom",
26
- "@material-ui/core",
27
- "@material-ui/icons",
28
- "@material-ui/lab",
29
- "@material-ui/pickers",
30
- "@material-ui/core/styles",
31
- "@mui/material",
32
- "@mui/x-date-pickers",
33
- "@mui/x-data-grid",
34
- "classnames",
35
- "react-hook-form",
36
- "ace-builds",
37
- "react-ace",
38
- "date-fns",
39
- "uuid",
40
- "tslib",
41
- "mui-rte"
42
- ],
43
- "compiler": "babel",
44
- "assets": [
45
- {
46
- "glob": "libs/arsenal-ui/README.md",
47
- "input": ".",
48
- "output": "."
49
- }
50
- ]
51
- }
52
- },
53
- "lint": {
54
- "executor": "@nrwl/linter:eslint",
55
- "outputs": ["{options.outputFile}"],
56
- "options": {
57
- "lintFilePatterns": ["libs/arsenal-ui/**/*.{ts,tsx,js,jsx}"]
58
- }
59
- },
60
- "test": {
61
- "executor": "@nrwl/jest:jest",
62
- "outputs": ["coverage/libs/arsenal-ui"],
63
- "options": {
64
- "jestConfig": "libs/arsenal-ui/jest.config.js",
65
- "passWithNoTests": true
66
- }
67
- }
68
- }
69
- }
package/rollup.config.js DELETED
@@ -1,135 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-ts-comment */
2
- // @ts-nocheck
3
-
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- const builtins = require('rollup-plugin-node-builtins');
6
- const resolve = require('@rollup/plugin-node-resolve');
7
- const json = require('@rollup/plugin-json');
8
- const terser = require('rollup-plugin-terser');
9
- const path = require('path');
10
- // const bpmnlint = require('rollup-plugin-bpmnlint');
11
- // const minify = require('rollup-plugin-babel-minify');
12
- const fileExtensions = ['.mjs', '.esm.js', 'cjs', '.js', '.ts', '.tsx', '.json', '.jsx'];
13
-
14
- function getRollupOptions(options) {
15
- const extraGlobals = {
16
- react: 'React',
17
- classnames: 'cn',
18
- crypto: 'crypto',
19
- '@mui/x-data-grid': 'xDataGrid',
20
- 'react-dom': 'ReactDOM',
21
- 'react-router-dom': 'ReactRouterDOM',
22
- 'styled-components': 'styled',
23
- '@emotion/react': 'emotionReact',
24
- '@emotion/styled': 'emotionStyled',
25
- 'axios': 'axios',
26
- 'url-join': 'urlJoin',
27
- '@material-ui/core': 'materialUiCore',
28
- 'react-hook-form': 'reactHookForm',
29
- '@material-ui/core/styles': 'MuiStyles',
30
- "@material-ui/icons/DeleteForever": "DeleteForeverIcon",
31
- '@material-ui/core/TextField': 'TextField',
32
- '@material-ui/core/MenuItem': 'MenuItem',
33
- '@material-ui/core/Button': 'Button',
34
- '@material-ui/core/Dialog': 'Dialog',
35
- '@material-ui/core/DialogActions': 'DialogActions',
36
- '@material-ui/core/DialogContent': 'DialogContent',
37
- '@material-ui/core/DialogContentText': 'DialogContentText',
38
- '@material-ui/core/DialogTitle': 'DialogTitle',
39
- '@material-ui/core/Box': 'Box',
40
- '@material-ui/core/Grid': 'Grid',
41
- '@material-ui/core/Checkbox': 'Checkbox',
42
- '@material-ui/core/FormControl': 'FormControl',
43
- '@material-ui/core/InputLabel': 'InputLabel',
44
- '@material-ui/core/Typography': 'Typography',
45
- '@material-ui/core/FormHelperText': 'FormHelperText',
46
- '@material-ui/lab/Pagination': 'Pagination',
47
- '@material-ui/lab/Autocomplete': 'Autocomplete',
48
- '@mui/x-date-pickers/DatePicker': 'DatePicker',
49
- '@mui/x-date-pickers/TimePicker': 'TimePicker',
50
- '@mui/x-date-pickers/DateTimePicker': 'DateTimePicker',
51
- '@mui/material/TextField': 'MuiTextField',
52
- '@material-ui/core/Card': 'Card',
53
- '@material-ui/core/CardContent': 'CardContent',
54
- '@material-ui/core/TablePagination': 'TablePagination',
55
- '@material-ui/icons/CheckCircle': 'CheckCircleIcon',
56
- '@material-ui/core/FormControlLabel': 'FormControlLabel',
57
- '@material-ui/core/IconButton': 'IconButton',
58
- '@material-ui/core/Tooltip': 'Tooltip',
59
- '@material-ui/icons/Add': 'AddIcon',
60
- '@material-ui/icons/FileCopyOutlined': 'FileCopyOutlined',
61
- '@material-ui/core/CircularProgress': 'CircularProgress',
62
- '@material-ui/icons/ZoomInOutlined': 'ZoomInIcon',
63
- '@material-ui/icons/ZoomOutOutlined': 'ZoomOutIcon',
64
- '@material-ui/icons/AspectRatioOutlined': 'AspectRatioOutlinedIcon',
65
- '@material-ui/icons/DeleteForeverOutlined': 'DeleteForeverOutlinedIcon',
66
- '@material-ui/icons/ReplayOutlined': 'ReplayOutlinedIcon',
67
- '@material-ui/icons/Settings': 'SettingsIcon',
68
- '@material-ui/icons/Pause': 'PauseIcon',
69
- '@material-ui/icons/PlayArrow': 'PlayArrowIcon',
70
- '@material-ui/core/ButtonGroup': 'ButtonGroupIcon',
71
- '@material-ui/core/Radio': 'Radio',
72
- '@material-ui/core/RadioGroup': 'RadioGroup',
73
- '@material-ui/core/List': 'List',
74
- '@material-ui/core/ListItem': 'ListItem',
75
- '@material-ui/core/ListItemText': 'ListItemText',
76
- '@material-ui/core/ListItemSecondaryAction': 'ListItemSecondaryAction',
77
- '@material-ui/core/Collapse': 'Collapse',
78
- '@material-ui/core/Table': 'MuiTable',
79
- '@material-ui/core/TableRow': 'TableRow',
80
- '@material-ui/core/TableCell': 'TableCell',
81
- '@material-ui/core/TableBody': 'TableBody',
82
- '@material-ui/core/TableContainer': 'TableContainer',
83
- '@material-ui/core/TableHead': 'TableHead',
84
- '@material-ui/icons/Close': 'CloseIcon',
85
- "@material-ui/pickers": 'pickers',
86
- 'react-ace': 'AceEditor',
87
- 'date-fns': 'dateFns',
88
- 'tslib': 'tslib',
89
- 'draft-js': 'draftJs',
90
- 'react-toastify': 'reactToastify',
91
- 'mui-rte': 'MUIRichTextEditor'
92
- };
93
- if (Array.isArray(options.output)) {
94
- options.output.forEach((o) => {
95
- o.globals = Object.assign(Object.assign({}, o.globals), extraGlobals);
96
- o.output.compact = true;
97
- // o.output.inlineDynamicImports = false;
98
- });
99
- }
100
- else {
101
- options.output = Object.assign(Object.assign({}, options.output), {
102
- globals: Object.assign(Object.assign({}, options.output.globals), extraGlobals),
103
- compact: true,
104
- // inlineDynamicImports: false
105
- });
106
- };
107
-
108
-
109
- options.treeshake = {
110
- moduleSideEffects: false,
111
- };
112
- options.external = (id) => {
113
- return !id.startsWith('.') && !path.isAbsolute(id);
114
- }
115
-
116
- options.plugins.push(
117
- resolve.nodeResolve({
118
- mainFields: ['module', 'browser', 'main'],
119
- preferBuiltins: true,
120
- extensions: fileExtensions,
121
- moduleDirectories: ['dist/libs', 'node_modules'], // IMPORTANT
122
- })
123
- );
124
- options.plugins.push(builtins());
125
- options.plugins.push(json());
126
- options.plugins.push(terser.terser());
127
- // options.plugins.push(bpmnlint({
128
- // include: '**/.bpmnlintrc',
129
- // exclude: []
130
- // }))
131
-
132
- return options;
133
- }
134
-
135
- module.exports = getRollupOptions;
@@ -1,12 +0,0 @@
1
- export enum RoundingMode {
2
- UP = 'UP',
3
- DOWN = 'DOWN',
4
- CEILING = 'CEILING',
5
- FLOOR = 'FLOOR',
6
- HALF_UP = 'HALF_UP',
7
- HALF_DOWN = 'HALF_DOWN',
8
- HALF_EVEN = 'HALF_EVEN',
9
- UNNECESSARY = 'UNNECESSARY',
10
- }
11
-
12
-
@@ -1,143 +0,0 @@
1
- import { RoundingMode } from './common';
2
-
3
- export enum PropertyType {
4
- STRING = 'STRING',
5
- INTEGER = 'INTEGER',
6
- BIG_INTEGER = 'BIG_INTEGER',
7
- BIG_DECIMAL = 'BIG_DECIMAL',
8
- FLOAT = 'FLOAT',
9
- LONG = 'LONG',
10
- DOUBLE = 'DOUBLE',
11
- BOOLEAN = 'BOOLEAN',
12
- ENTITY_REFERENCE = 'ENTITY_REFERENCE',
13
- ENTITY = 'ENTITY',
14
- JSON = 'JSON',
15
- DATE = 'DATE',
16
- TIME = 'TIME',
17
- DATE_TIME = 'DATE_TIME',
18
- }
19
-
20
- export interface Definition {
21
- code: string;
22
- version: number;
23
- name: string;
24
- properties: PropertiesObjectType;
25
- }
26
-
27
- export type PropertiesObjectType<T = unknown> = Record<string, PropertyUnion & T>;
28
- export type PropertiesArrayType<T = unknown> = Array<PropertyUnion & T>;
29
-
30
- export interface CreateDefinitionType extends Omit<Definition, 'properties'> {
31
- properties: PropertiesArrayType;
32
- }
33
- export interface UpdateDefinitionType extends Omit<Definition, 'properties'> {
34
- properties: PropertiesArrayType;
35
- }
36
-
37
- export interface Property {
38
- propertyType: keyof typeof PropertyType | { value: keyof typeof PropertyType };
39
- name: string;
40
- defaultValue: unknown;
41
- defaultValues: unknown[];
42
- isRequired: boolean;
43
- isMultiple: boolean;
44
- sortOrder: number;
45
- isEnabled: boolean;
46
- uiSettings: unknown;
47
- validationNode: unknown;
48
- // FRONTEND FIELDS
49
- key?: string;
50
- }
51
-
52
- export interface BigDecimalProperty extends Property {
53
- propertyType: PropertyType.BIG_DECIMAL;
54
- precisionScale: number;
55
- roundingMode: keyof typeof RoundingMode;
56
- }
57
-
58
- export interface BigIntegerProperty extends Property {
59
- propertyType: PropertyType.BIG_INTEGER;
60
- }
61
-
62
- export interface BooleanProperty extends Property {
63
- propertyType: PropertyType.BOOLEAN;
64
- }
65
-
66
- export interface DateProperty extends Property {
67
- propertyType: PropertyType.DATE;
68
- format: string;
69
- }
70
-
71
- export interface DateTimeProperty extends Property {
72
- propertyType: PropertyType.DATE_TIME;
73
- format: string;
74
- }
75
-
76
- export interface DoubleProperty extends Property {
77
- propertyType: PropertyType.DOUBLE;
78
- }
79
-
80
- export interface EntityTypeProperty extends Property {
81
- propertyType: PropertyType.ENTITY;
82
- properties: PropertiesObjectType | PropertiesArrayType;
83
- }
84
-
85
- export interface EntityReferenceProperty extends Property {
86
- propertyType: PropertyType.ENTITY_REFERENCE;
87
- definitionCode: string;
88
- definitionVersion: string;
89
- labelPropertyCode: string;
90
- valuePropertyCode: string;
91
- }
92
-
93
- export interface FloatProperty extends Property {
94
- propertyType: PropertyType.FLOAT;
95
- }
96
-
97
- export interface StringProperty extends Property {
98
- propertyType: PropertyType.STRING;
99
- restrictedValues: string[];
100
- }
101
-
102
- export interface IntegerProperty extends Property {
103
- propertyType: PropertyType.INTEGER;
104
- }
105
-
106
- export interface JsonProperty extends Property {
107
- propertyType: PropertyType.JSON;
108
- }
109
-
110
- export interface LongProperty extends Property {
111
- propertyType: PropertyType.LONG;
112
- }
113
-
114
- export interface TimeProperty extends Property {
115
- propertyType: PropertyType.TIME;
116
- format: string;
117
- }
118
-
119
- export type PropertyUnion =
120
- | BigDecimalProperty
121
- | BigIntegerProperty
122
- | BooleanProperty
123
- | DateProperty
124
- | DateTimeProperty
125
- | DoubleProperty
126
- | EntityTypeProperty
127
- | EntityReferenceProperty
128
- | FloatProperty
129
- | StringProperty
130
- | IntegerProperty
131
- | JsonProperty
132
- | LongProperty
133
- | TimeProperty;
134
-
135
- export const DATE_DEFAULT_FORMAT = 'yyyy-MM-dd';
136
- export const TIME_DEFAULT_FORMAT = 'HH:mm:ss';
137
- export const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
138
-
139
- export type GPBPropertiesObjectType = PropertiesObjectType<{ value: unknown; values: unknown[] }>;
140
- export type GPBPropertiesArrayType = PropertiesArrayType<{ value: unknown; values: unknown[] }>;
141
-
142
- export type EntityDefinitionPropertyObjectType = PropertiesObjectType<{ isViewableInList: boolean }>;
143
- export type EntityDefinitionPropertyArrayType = PropertiesArrayType<{ isViewableInList: boolean }>;
@@ -1,35 +0,0 @@
1
- import { PropertiesArrayType } from './definition';
2
-
3
- export interface FilterField {
4
- name: string;
5
- label: string;
6
- type: 'text' | 'select' | 'autocomplete' | 'date' | 'number' | 'date_time';
7
- value?: unknown;
8
- multiple?: boolean;
9
- options?: {
10
- value: string;
11
- label: string;
12
- }[];
13
- }
14
-
15
- export interface Option {
16
- value: string;
17
- label: string;
18
- }
19
-
20
- export type TableDataType = 'JSON' | 'JSON_text' | 'JSON_copy' | 'copy' | 'boolean' | 'date' | 'status' | 'array';
21
-
22
- export type JsonPathPickerProperties = {
23
- properties: PropertiesArrayType;
24
- pathPrefix: string;
25
- title: string;
26
- }[];
27
-
28
- export type CustomPropertyFieldProps = {
29
- name: string;
30
- label?: string;
31
- type: 'text' | 'checkbox' | 'number' | 'select' | 'autocomplete' | 'json';
32
- decimal?: boolean;
33
- options?: string[] | { value: unknown; label: string }[];
34
- required?: boolean;
35
- };