@dartech/arsenal-ui 1.2.3 → 1.2.5

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 (271) hide show
  1. package/.babelrc +13 -0
  2. package/.eslintrc.json +22 -0
  3. package/{index.d.ts → index.ts} +5 -5
  4. package/jest.config.ts +11 -0
  5. package/package.json +3 -12
  6. package/project.json +94 -0
  7. package/rollup.config.js +146 -0
  8. package/src/assets/chevron_left_gray.svg +3 -0
  9. package/src/consts/index.ts +13 -0
  10. package/src/interfaces/common.ts +18 -0
  11. package/src/interfaces/definition.ts +143 -0
  12. package/src/interfaces/{index.d.ts → index.ts} +3 -3
  13. package/src/interfaces/ui.ts +80 -0
  14. package/src/lib/Alert/Alert.tsx +108 -0
  15. package/src/lib/Alert/index.ts +1 -0
  16. package/src/lib/Breadcrumbs/Breadcrumbs.styled.tsx +16 -0
  17. package/src/lib/Breadcrumbs/Breadcrumbs.tsx +40 -0
  18. package/src/lib/Breadcrumbs/{index.d.ts → index.ts} +1 -1
  19. package/src/lib/ContentLayout/ContentLayout.tsx +31 -0
  20. package/src/lib/ContentLayout/index.ts +1 -0
  21. package/src/lib/Definition/CreateDefinition/CreateDefinition.tsx +78 -0
  22. package/src/lib/Definition/CreateDefinition/{index.d.ts → index.ts} +1 -1
  23. package/src/lib/Definition/DefinitionFiller/DefinitionFiller.tsx +71 -0
  24. package/src/lib/Definition/DefinitionFiller/{index.d.ts → index.ts} +1 -1
  25. package/src/lib/Definition/DefinitionValueView/DefinitionValueView.tsx +54 -0
  26. package/src/lib/Definition/DefinitionValueView/PropertyDataView.tsx +67 -0
  27. package/src/lib/Definition/DefinitionValueView/{index.d.ts → index.ts} +1 -1
  28. package/src/lib/Definition/{index.d.ts → index.ts} +3 -3
  29. package/src/lib/Forms/BackButton.tsx +46 -0
  30. package/src/lib/Forms/ControlAceEditor.tsx +125 -0
  31. package/src/lib/Forms/ControlAutocomplete.tsx +145 -0
  32. package/src/lib/Forms/ControlCheckbox.tsx +113 -0
  33. package/src/lib/Forms/ControlDate.tsx +75 -0
  34. package/src/lib/Forms/ControlDateTime.tsx +77 -0
  35. package/src/lib/Forms/ControlDebouncedInput.tsx +80 -0
  36. package/src/lib/Forms/ControlInput.tsx +111 -0
  37. package/src/lib/Forms/ControlNumberInput.tsx +121 -0
  38. package/src/lib/Forms/ControlQueryAutocomplete.tsx +197 -0
  39. package/src/lib/Forms/ControlRadio.tsx +136 -0
  40. package/src/lib/Forms/ControlSelect.tsx +164 -0
  41. package/src/lib/Forms/ControlSwitch.tsx +71 -0
  42. package/src/lib/Forms/ControlTime.tsx +93 -0
  43. package/src/lib/Forms/CopyButton.tsx +46 -0
  44. package/src/lib/Forms/{index.d.ts → index.ts} +15 -15
  45. package/src/lib/Forms/useAutocomplete.tsx +47 -0
  46. package/src/lib/InfoItem/InfoItem.tsx +40 -0
  47. package/src/lib/InfoItem/{index.d.ts → index.ts} +1 -1
  48. package/src/lib/InfoItem/styles.ts +17 -0
  49. package/src/lib/JsonPathPicker/JsonPathPicker.tsx +73 -0
  50. package/src/lib/JsonPathPicker/PropertyStep.tsx +70 -0
  51. package/src/lib/JsonPathPicker/{index.d.ts → index.ts} +1 -1
  52. package/src/lib/JsonView/JsonView.tsx +41 -0
  53. package/src/lib/JsonView/{index.d.ts → index.ts} +1 -1
  54. package/src/lib/Loader/Loader.tsx +41 -0
  55. package/src/lib/Loader/{index.d.ts → index.ts} +1 -1
  56. package/src/lib/Modals/JsonModalView.tsx +53 -0
  57. package/src/lib/Modals/{index.d.ts → index.ts} +1 -1
  58. package/src/lib/Property/PropertyFiller/JsonEditor.tsx +58 -0
  59. package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.tsx +129 -0
  60. package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.tsx +85 -0
  61. package/src/lib/Property/PropertyFiller/PropertyFiller.tsx +199 -0
  62. package/src/lib/Property/PropertyFiller/{index.d.ts → index.ts} +2 -2
  63. package/src/lib/Property/PropertyFiller/usePropertyFiller.ts +72 -0
  64. package/src/lib/Property/PropertyFiller/useStyles.ts +12 -0
  65. package/src/lib/Property/PropertyValidator/NodeValidator.tsx +92 -0
  66. package/src/lib/Property/PropertyValidator/NodesList.tsx +26 -0
  67. package/src/lib/Property/PropertyValidator/NumericTypeValidator.tsx +59 -0
  68. package/src/lib/Property/PropertyValidator/PropertyValidator.tsx +42 -0
  69. package/src/lib/Property/PropertyValidator/PropertyValidatorContext.tsx +4 -0
  70. package/src/lib/Property/PropertyValidator/StringTypeValidator.tsx +36 -0
  71. package/src/lib/Property/PropertyValidator/ValidationNodeSelector.tsx +62 -0
  72. package/src/lib/Property/PropertyValidator/index.ts +1 -0
  73. package/src/lib/Property/PropertyValueField/BooleanValueField.tsx +49 -0
  74. package/src/lib/Property/PropertyValueField/DateTimeValueField.tsx +58 -0
  75. package/src/lib/Property/PropertyValueField/DateValueField.tsx +58 -0
  76. package/src/lib/Property/PropertyValueField/JsonValueField.tsx +65 -0
  77. package/src/lib/Property/PropertyValueField/PropertyValueField.tsx +49 -0
  78. package/src/lib/Property/PropertyValueField/StringValueField.tsx +50 -0
  79. package/src/lib/Property/PropertyValueField/TimeValueField.tsx +67 -0
  80. package/src/lib/Property/PropertyValueField/{index.d.ts → index.ts} +1 -1
  81. package/src/lib/Property/PropertyWidget/PropertyWidget.tsx +115 -0
  82. package/src/lib/Property/PropertyWidget/{index.d.ts → index.ts} +1 -1
  83. package/src/lib/Property/UpsertProperty/CreatePropertiesList.tsx +148 -0
  84. package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.tsx +158 -0
  85. package/src/lib/Property/UpsertProperty/CustomPropertyField.tsx +40 -0
  86. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.tsx +41 -0
  87. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.tsx +27 -0
  88. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.tsx +133 -0
  89. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.tsx +46 -0
  90. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.tsx +52 -0
  91. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.tsx +103 -0
  92. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/{index.d.ts → index.ts} +1 -1
  93. package/src/lib/Property/UpsertProperty/{index.d.ts → index.ts} +2 -2
  94. package/src/lib/Property/UpsertProperty/useCustomFields.ts +22 -0
  95. package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.tsx +37 -0
  96. package/src/lib/Property/ViewPropertiesList/{index.d.ts → index.ts} +1 -1
  97. package/src/lib/Property/ViewProperty/EntityPropertiesShortView.tsx +40 -0
  98. package/src/lib/Property/ViewProperty/EntityPropertiesView.tsx +48 -0
  99. package/src/lib/Property/ViewProperty/PropertyDataTable.tsx +148 -0
  100. package/src/lib/Property/ViewProperty/PropertyItem.tsx +43 -0
  101. package/src/lib/Property/ViewProperty/ViewProperty.tsx +52 -0
  102. package/src/lib/Property/ViewProperty/{index.d.ts → index.ts} +1 -1
  103. package/src/lib/Property/{index.d.ts → index.ts} +5 -5
  104. package/src/lib/Sidebar/Sidebar.styled.tsx +157 -0
  105. package/src/lib/Sidebar/Sidebar.tsx +27 -0
  106. package/src/lib/Sidebar/SidebarContext.tsx +37 -0
  107. package/src/lib/Sidebar/SidebarDrawer.tsx +50 -0
  108. package/src/lib/Sidebar/SidebarLink/MenuIcon.tsx +16 -0
  109. package/src/lib/Sidebar/SidebarLink/SidebarLink.tsx +54 -0
  110. package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.tsx +54 -0
  111. package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.tsx +62 -0
  112. package/src/lib/Sidebar/SidebarLink/{index.d.ts → index.ts} +2 -2
  113. package/src/lib/Sidebar/index.ts +2 -0
  114. package/src/lib/Status/Status.tsx +16 -0
  115. package/src/lib/Status/{index.d.ts → index.ts} +1 -1
  116. package/src/lib/Status/styles.ts +21 -0
  117. package/src/lib/StepperView/StepperView.tsx +73 -0
  118. package/src/lib/StepperView/{index.d.ts → index.ts} +1 -1
  119. package/src/lib/Table/DataGrid/JsonTypeCell.tsx +51 -0
  120. package/src/lib/Table/DataGrid/Table.tsx +117 -0
  121. package/src/lib/Table/DataGrid/TableAction.tsx +43 -0
  122. package/src/lib/Table/DataGrid/TableColumnMenu.tsx +12 -0
  123. package/src/lib/Table/DataGrid/TablePagination.tsx +42 -0
  124. package/src/lib/Table/DataGrid/index.ts +2 -0
  125. package/src/lib/Table/DataGrid/styles.ts +59 -0
  126. package/src/lib/Table/DataGrid/usePagination.ts +15 -0
  127. package/src/lib/Table/DataGrid/useTableQueryPagination.ts +47 -0
  128. package/src/lib/Table/DataGrid/useTableQuerySorting.ts +47 -0
  129. package/src/lib/Table/SimpleTable/SimpleTable.tsx +138 -0
  130. package/src/lib/Table/SimpleTable/TableActionCell.tsx +67 -0
  131. package/src/lib/Table/SimpleTable/index.ts +2 -0
  132. package/src/lib/Table/SimpleTable/useTablePagination.ts +54 -0
  133. package/src/lib/Table/SimpleTable/useTableSorting.ts +50 -0
  134. package/src/lib/Table/index.ts +2 -0
  135. package/src/lib/Tabs/RouteTabs.tsx +54 -0
  136. package/src/lib/Tabs/TabPanel.tsx +42 -0
  137. package/src/lib/Tabs/{index.d.ts → index.ts} +2 -2
  138. package/src/lib/{index.d.ts → index.ts} +16 -16
  139. package/src/theme/baseTheme.ts +128 -0
  140. package/src/theme/fonts.d.ts +2 -0
  141. package/src/theme/index.ts +126 -0
  142. package/src/theme/inputThemeOptions.ts +126 -0
  143. package/src/theme/stepperThemeOptions.ts +20 -0
  144. package/src/theme/tableThemeOptions.ts +50 -0
  145. package/src/theme/typographyThemeOptions.ts +32 -0
  146. package/src/utils/common.ts +73 -0
  147. package/src/utils/dem.ts +431 -0
  148. package/src/utils/hooks.ts +41 -0
  149. package/src/utils/{index.d.ts → index.ts} +5 -5
  150. package/src/utils/ui-utils.tsx +102 -0
  151. package/src/utils/validators.ts +14 -0
  152. package/tsconfig.json +25 -0
  153. package/tsconfig.lib.json +23 -0
  154. package/tsconfig.spec.json +20 -0
  155. package/index.js +0 -1
  156. package/src/consts/index.d.ts +0 -12
  157. package/src/interfaces/common.d.ts +0 -17
  158. package/src/interfaces/definition.d.ts +0 -107
  159. package/src/interfaces/ui.d.ts +0 -70
  160. package/src/lib/Alert/Alert.d.ts +0 -53
  161. package/src/lib/Alert/index.d.ts +0 -1
  162. package/src/lib/Breadcrumbs/Breadcrumbs.d.ts +0 -9
  163. package/src/lib/Breadcrumbs/Breadcrumbs.styled.d.ts +0 -2
  164. package/src/lib/ContentLayout/ContentLayout.d.ts +0 -9
  165. package/src/lib/ContentLayout/index.d.ts +0 -1
  166. package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +0 -11
  167. package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +0 -10
  168. package/src/lib/Definition/DefinitionValueView/DefinitionValueView.d.ts +0 -8
  169. package/src/lib/Definition/DefinitionValueView/PropertyDataView.d.ts +0 -9
  170. package/src/lib/Forms/BackButton.d.ts +0 -7
  171. package/src/lib/Forms/ControlAceEditor.d.ts +0 -24
  172. package/src/lib/Forms/ControlAutocomplete.d.ts +0 -69
  173. package/src/lib/Forms/ControlCheckbox.d.ts +0 -51
  174. package/src/lib/Forms/ControlDate.d.ts +0 -18
  175. package/src/lib/Forms/ControlDateTime.d.ts +0 -18
  176. package/src/lib/Forms/ControlDebouncedInput.d.ts +0 -4
  177. package/src/lib/Forms/ControlInput.d.ts +0 -59
  178. package/src/lib/Forms/ControlNumberInput.d.ts +0 -51
  179. package/src/lib/Forms/ControlQueryAutocomplete.d.ts +0 -16
  180. package/src/lib/Forms/ControlRadio.d.ts +0 -66
  181. package/src/lib/Forms/ControlSelect.d.ts +0 -67
  182. package/src/lib/Forms/ControlSwitch.d.ts +0 -19
  183. package/src/lib/Forms/ControlTime.d.ts +0 -18
  184. package/src/lib/Forms/CopyButton.d.ts +0 -20
  185. package/src/lib/Forms/useAutocomplete.d.ts +0 -10
  186. package/src/lib/InfoItem/InfoItem.d.ts +0 -10
  187. package/src/lib/InfoItem/styles.d.ts +0 -12
  188. package/src/lib/JsonPathPicker/JsonPathPicker.d.ts +0 -10
  189. package/src/lib/JsonPathPicker/PropertyStep.d.ts +0 -11
  190. package/src/lib/JsonView/JsonView.d.ts +0 -7
  191. package/src/lib/Loader/Loader.d.ts +0 -21
  192. package/src/lib/Modals/JsonModalView.d.ts +0 -10
  193. package/src/lib/Property/PropertyFiller/JsonEditor.d.ts +0 -10
  194. package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.d.ts +0 -12
  195. package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.d.ts +0 -11
  196. package/src/lib/Property/PropertyFiller/PropertyFiller.d.ts +0 -12
  197. package/src/lib/Property/PropertyFiller/usePropertyFiller.d.ts +0 -24
  198. package/src/lib/Property/PropertyFiller/useStyles.d.ts +0 -12
  199. package/src/lib/Property/PropertyValidator/NodeValidator.d.ts +0 -6
  200. package/src/lib/Property/PropertyValidator/NodesList.d.ts +0 -6
  201. package/src/lib/Property/PropertyValidator/NumericTypeValidator.d.ts +0 -8
  202. package/src/lib/Property/PropertyValidator/PropertyValidator.d.ts +0 -6
  203. package/src/lib/Property/PropertyValidator/PropertyValidatorContext.d.ts +0 -3
  204. package/src/lib/Property/PropertyValidator/StringTypeValidator.d.ts +0 -8
  205. package/src/lib/Property/PropertyValidator/ValidationNodeSelector.d.ts +0 -7
  206. package/src/lib/Property/PropertyValidator/index.d.ts +0 -1
  207. package/src/lib/Property/PropertyValueField/BooleanValueField.d.ts +0 -7
  208. package/src/lib/Property/PropertyValueField/DateTimeValueField.d.ts +0 -9
  209. package/src/lib/Property/PropertyValueField/DateValueField.d.ts +0 -9
  210. package/src/lib/Property/PropertyValueField/JsonValueField.d.ts +0 -10
  211. package/src/lib/Property/PropertyValueField/PropertyValueField.d.ts +0 -9
  212. package/src/lib/Property/PropertyValueField/StringValueField.d.ts +0 -9
  213. package/src/lib/Property/PropertyValueField/TimeValueField.d.ts +0 -9
  214. package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +0 -13
  215. package/src/lib/Property/UpsertProperty/CreatePropertiesList.d.ts +0 -13
  216. package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +0 -10
  217. package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +0 -7
  218. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +0 -6
  219. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +0 -7
  220. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +0 -8
  221. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +0 -6
  222. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +0 -10
  223. package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +0 -6
  224. package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +0 -6
  225. package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +0 -8
  226. package/src/lib/Property/ViewProperty/EntityPropertiesShortView.d.ts +0 -7
  227. package/src/lib/Property/ViewProperty/EntityPropertiesView.d.ts +0 -8
  228. package/src/lib/Property/ViewProperty/PropertyDataTable.d.ts +0 -7
  229. package/src/lib/Property/ViewProperty/PropertyItem.d.ts +0 -9
  230. package/src/lib/Property/ViewProperty/ViewProperty.d.ts +0 -9
  231. package/src/lib/Sidebar/Sidebar.d.ts +0 -10
  232. package/src/lib/Sidebar/Sidebar.styled.d.ts +0 -117
  233. package/src/lib/Sidebar/SidebarContext.d.ts +0 -11
  234. package/src/lib/Sidebar/SidebarDrawer.d.ts +0 -9
  235. package/src/lib/Sidebar/SidebarLink/MenuIcon.d.ts +0 -7
  236. package/src/lib/Sidebar/SidebarLink/SidebarLink.d.ts +0 -7
  237. package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.d.ts +0 -8
  238. package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.d.ts +0 -10
  239. package/src/lib/Sidebar/index.d.ts +0 -2
  240. package/src/lib/Status/Status.d.ts +0 -8
  241. package/src/lib/Status/styles.d.ts +0 -12
  242. package/src/lib/StepperView/StepperView.d.ts +0 -11
  243. package/src/lib/Table/DataGrid/JsonTypeCell.d.ts +0 -7
  244. package/src/lib/Table/DataGrid/Table.d.ts +0 -49
  245. package/src/lib/Table/DataGrid/TableAction.d.ts +0 -13
  246. package/src/lib/Table/DataGrid/TableColumnMenu.d.ts +0 -3
  247. package/src/lib/Table/DataGrid/TablePagination.d.ts +0 -3
  248. package/src/lib/Table/DataGrid/index.d.ts +0 -2
  249. package/src/lib/Table/DataGrid/styles.d.ts +0 -12
  250. package/src/lib/Table/DataGrid/usePagination.d.ts +0 -5
  251. package/src/lib/Table/DataGrid/useTableQueryPagination.d.ts +0 -11
  252. package/src/lib/Table/DataGrid/useTableQuerySorting.d.ts +0 -6
  253. package/src/lib/Table/SimpleTable/SimpleTable.d.ts +0 -17
  254. package/src/lib/Table/SimpleTable/TableActionCell.d.ts +0 -10
  255. package/src/lib/Table/SimpleTable/index.d.ts +0 -2
  256. package/src/lib/Table/SimpleTable/useTablePagination.d.ts +0 -7
  257. package/src/lib/Table/SimpleTable/useTableSorting.d.ts +0 -6
  258. package/src/lib/Table/index.d.ts +0 -2
  259. package/src/lib/Tabs/RouteTabs.d.ts +0 -11
  260. package/src/lib/Tabs/TabPanel.d.ts +0 -25
  261. package/src/theme/baseTheme.d.ts +0 -2
  262. package/src/theme/index.d.ts +0 -1
  263. package/src/theme/inputThemeOptions.d.ts +0 -117
  264. package/src/theme/stepperThemeOptions.d.ts +0 -16
  265. package/src/theme/tableThemeOptions.d.ts +0 -47
  266. package/src/theme/typographyThemeOptions.d.ts +0 -29
  267. package/src/utils/common.d.ts +0 -7
  268. package/src/utils/dem.d.ts +0 -27
  269. package/src/utils/hooks.d.ts +0 -7
  270. package/src/utils/ui-utils.d.ts +0 -8
  271. package/src/utils/validators.d.ts +0 -5
package/.babelrc ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "presets": [
3
+ [
4
+ "@nrwl/react/babel",
5
+ {
6
+ "runtime": "automatic",
7
+ "useBuiltIns": "usage",
8
+ "importSource": "@emotion/react"
9
+ }
10
+ ]
11
+ ],
12
+ "plugins": ["@emotion/babel-plugin"]
13
+ }
package/.eslintrc.json ADDED
@@ -0,0 +1,22 @@
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
+ }
@@ -1,5 +1,5 @@
1
- export * from './src/interfaces';
2
- export * from './src/lib';
3
- export * from './src/utils';
4
- export * from './src/theme';
5
- export * from './src/consts';
1
+ export * from './src/interfaces';
2
+ export * from './src/lib';
3
+ export * from './src/utils';
4
+ export * from './src/theme';
5
+ export * from './src/consts';
package/jest.config.ts ADDED
@@ -0,0 +1,11 @@
1
+ /* eslint-disable */
2
+ export default {
3
+ displayName: 'arsenal-ui',
4
+ preset: '../../jest.preset.js',
5
+ transform: {
6
+ '^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
7
+ '^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/react/babel'] }],
8
+ },
9
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
10
+ coverageDirectory: '../../coverage/packages/arsenal-ui',
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,15 +24,6 @@
24
24
  "react-router-dom": "6.8.0",
25
25
  "react-toastify": "^9.1.1",
26
26
  "classnames": "^2.3.1",
27
- "@tanstack/react-query": "^4.24.10",
28
- "@dartech/arsenal-ui": "0.3.69",
29
- "@rollup/plugin-node-resolve": "13.3.0",
30
- "qs": "6.11.0",
31
- "tss-react": "4.6.0"
32
- },
33
- "module": "./index.js",
34
- "main": "./index.js",
35
- "type": "module",
36
- "types": "./index.d.ts",
37
- "peerDependencies": {}
27
+ "@tanstack/react-query": "^4.24.10"
28
+ }
38
29
  }
package/project.json ADDED
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "arsenal-ui",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "sourceRoot": "packages/arsenal-ui/src",
5
+ "projectType": "library",
6
+ "tags": [],
7
+ "targets": {
8
+ "lint": {
9
+ "executor": "@nrwl/linter:eslint",
10
+ "outputs": ["{options.outputFile}"],
11
+ "options": {
12
+ "lintFilePatterns": ["packages/arsenal-ui/**/*.{ts,tsx,js,jsx}"]
13
+ }
14
+ },
15
+ "build": {
16
+ "executor": "@nrwl/rollup:rollup",
17
+ "outputs": ["{options.outputPath}"],
18
+ "options": {
19
+ "outputPath": "dist/packages/arsenal-ui",
20
+ "tsConfig": "packages/arsenal-ui/tsconfig.lib.json",
21
+ "project": "packages/arsenal-ui/package.json",
22
+ "entryFile": "packages/arsenal-ui/index.ts",
23
+ "rollupConfig": "packages/arsenal-ui/rollup.config",
24
+ "buildableProjectDepsInPackageJsonType": "dependencies",
25
+ "compiler": "babel",
26
+ "external": [
27
+ "@emotion/react/jsx-runtime",
28
+ "react",
29
+ "react/jsx-runtime",
30
+ "axios",
31
+ "url-join",
32
+ "dmn-js",
33
+ "jspdf",
34
+ "canvg",
35
+ "react-toastify",
36
+ "react-router-dom",
37
+ "@mui/material",
38
+ "@mui/icons-material",
39
+ "@mui/material",
40
+ "@mui/x-date-pickers",
41
+ "@mui/x-data-grid",
42
+ "classnames",
43
+ "react-hook-form",
44
+ "ace-builds",
45
+ "react-ace",
46
+ "date-fns",
47
+ "uuid",
48
+ "tslib",
49
+ "@tanstack/react-query",
50
+ "tss-react",
51
+ "@uiw/react-codemirror"
52
+ ],
53
+ "assets": [
54
+ {
55
+ "glob": "packages/arsenal-ui/src/assets/fonts/Euclid",
56
+ "input": ".",
57
+ "output": "./src/assets/fonts"
58
+ },
59
+ {
60
+ "glob": "packages/arsenal-ui/src/assets/chevron_left.svg",
61
+ "input": ".",
62
+ "output": "./src/assets"
63
+ },
64
+ {
65
+ "glob": "packages/arsenal-ui/README.md",
66
+ "input": ".",
67
+ "output": "."
68
+ }
69
+ ]
70
+ }
71
+ },
72
+ "publish": {
73
+ "executor": "nx:run-commands",
74
+ "options": {
75
+ "command": "node tools/scripts/publish.mjs arsenal-ui"
76
+ },
77
+ "dependsOn": ["build"]
78
+ },
79
+ "test": {
80
+ "executor": "@nrwl/jest:jest",
81
+ "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
82
+ "options": {
83
+ "jestConfig": "packages/arsenal-ui/jest.config.ts",
84
+ "passWithNoTests": true
85
+ },
86
+ "configurations": {
87
+ "ci": {
88
+ "ci": true,
89
+ "codeCoverage": true
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,146 @@
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+ // @ts-nocheck
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+ const nrwlConfig = require('@nrwl/react/plugins/bundle-rollup');
6
+ const builtins = require('rollup-plugin-node-builtins');
7
+ const resolve = require('@rollup/plugin-node-resolve');
8
+ const json = require('@rollup/plugin-json');
9
+ const terser = require('rollup-plugin-terser');
10
+ const path = require('path');
11
+ // const copy = require('@web/rollup-plugin-copy').copy;
12
+ const fileExtensions = [
13
+ '.mjs',
14
+ '.esm.js',
15
+ 'cjs',
16
+ '.js',
17
+ '.ts',
18
+ '.tsx',
19
+ '.json',
20
+ '.jsx',
21
+ ];
22
+ const url = require('@rollup/plugin-url');
23
+
24
+ function getRollupOptions(options) {
25
+ const extraGlobals = {
26
+ react: 'React',
27
+ classnames: 'cn',
28
+ crypto: 'crypto',
29
+ '@mui/x-data-grid': 'xDataGrid',
30
+ 'react-dom': 'ReactDOM',
31
+ 'react-router-dom': 'ReactRouterDOM',
32
+ 'styled-components': 'styled',
33
+ '@emotion/react': 'emotionReact',
34
+ '@emotion/styled': 'emotionStyled',
35
+ axios: 'axios',
36
+ 'url-join': 'urlJoin',
37
+ '@mui/material': 'materialUiCore',
38
+ 'react-hook-form': 'reactHookForm',
39
+ '@mui/icons-material/DeleteForever': 'DeleteForeverIcon',
40
+ '@mui/material/TextField': 'TextField',
41
+ '@mui/material/MenuItem': 'MenuItem',
42
+ '@mui/material/Button': 'Button',
43
+ '@mui/material/Dialog': 'Dialog',
44
+ '@mui/material/DialogActions': 'DialogActions',
45
+ '@mui/material/DialogContent': 'DialogContent',
46
+ '@mui/material/DialogContentText': 'DialogContentText',
47
+ '@mui/material/DialogTitle': 'DialogTitle',
48
+ '@mui/material/Box': 'Box',
49
+ '@mui/material/Unstable_Grid2': 'Grid',
50
+ '@mui/material/Checkbox': 'Checkbox',
51
+ '@mui/material/FormControl': 'FormControl',
52
+ '@mui/material/InputLabel': 'InputLabel',
53
+ '@mui/material/Typography': 'Typography',
54
+ '@mui/material/FormHelperText': 'FormHelperText',
55
+ '@mui/x-date-pickers/DatePicker': 'DatePicker',
56
+ '@mui/x-date-pickers/TimePicker': 'TimePicker',
57
+ '@mui/x-date-pickers/DateTimePicker': 'DateTimePicker',
58
+ '@mui/material/Card': 'Card',
59
+ '@mui/material/CardContent': 'CardContent',
60
+ '@mui/material/TablePagination': 'TablePagination',
61
+ '@mui/icons-material/CheckCircle': 'CheckCircleIcon',
62
+ '@mui/material/FormControlLabel': 'FormControlLabel',
63
+ '@mui/material/IconButton': 'IconButton',
64
+ '@mui/material/Tooltip': 'Tooltip',
65
+ '@mui/icons-material/Add': 'AddIcon',
66
+ '@mui/icons-material/FileCopyOutlined': 'FileCopyOutlined',
67
+ '@mui/material/CircularProgress': 'CircularProgress',
68
+ '@mui/icons-material/ZoomInOutlined': 'ZoomInIcon',
69
+ '@mui/icons-material/ZoomOutOutlined': 'ZoomOutIcon',
70
+ '@mui/icons-material/AspectRatioOutlined': 'AspectRatioOutlinedIcon',
71
+ '@mui/icons-material/DeleteForeverOutlined': 'DeleteForeverOutlinedIcon',
72
+ '@mui/icons-material/ReplayOutlined': 'ReplayOutlinedIcon',
73
+ '@mui/icons-material/Settings': 'SettingsIcon',
74
+ '@mui/icons-material/Pause': 'PauseIcon',
75
+ '@mui/icons-material/PlayArrow': 'PlayArrowIcon',
76
+ '@mui/icons-material/Fullscreen': 'Fullscreen',
77
+ '@mui/icons-material/NotInterested': 'NotInterestedIcon',
78
+ '@mui/material/ButtonGroup': 'ButtonGroupIcon',
79
+ '@mui/material/Radio': 'Radio',
80
+ '@mui/material/RadioGroup': 'RadioGroup',
81
+ '@mui/material/List': 'List',
82
+ '@mui/material/ListItem': 'ListItem',
83
+ '@mui/material/ListItemText': 'ListItemText',
84
+ '@mui/material/ListItemSecondaryAction': 'ListItemSecondaryAction',
85
+ '@mui/material/Collapse': 'Collapse',
86
+ '@mui/material/Table': 'MuiTable',
87
+ '@mui/material/TableRow': 'TableRow',
88
+ '@mui/material/TableCell': 'TableCell',
89
+ '@mui/material/TableBody': 'TableBody',
90
+ '@mui/material/TableContainer': 'TableContainer',
91
+ '@mui/material/TableHead': 'TableHead',
92
+ '@mui/material/Breadcrumbs': 'Breadcrumbs',
93
+ '@mui/icons-material/Close': 'CloseIcon',
94
+ 'react-ace': 'AceEditor',
95
+ 'date-fns': 'dateFns',
96
+ tslib: 'tslib',
97
+ 'draft-js': 'draftJs',
98
+ 'react-toastify': 'reactToastify',
99
+ };
100
+ if (Array.isArray(options.output)) {
101
+ options.output.forEach((o) => {
102
+ o.globals = Object.assign(Object.assign({}, o.globals), extraGlobals);
103
+ o.output.compact = true;
104
+ // o.output.inlineDynamicImports = false;
105
+ });
106
+ } else {
107
+ options.output = Object.assign(Object.assign({}, options.output), {
108
+ globals: Object.assign(
109
+ Object.assign({}, options.output.globals),
110
+ extraGlobals
111
+ ),
112
+ compact: true,
113
+ // inlineDynamicImports: false
114
+ });
115
+ }
116
+
117
+ options.treeshake = {
118
+ moduleSideEffects: false,
119
+ preset: 'recommended',
120
+ };
121
+ options.external = (id) => {
122
+ return !id.startsWith('.') && !path.isAbsolute(id);
123
+ };
124
+
125
+ options.plugins.push(
126
+ resolve.nodeResolve({
127
+ mainFields: ['module', 'browser', 'main'],
128
+ preferBuiltins: true,
129
+ extensions: fileExtensions,
130
+ moduleDirectories: ['dist/libs', 'node_modules'], // IMPORTANT
131
+ })
132
+ );
133
+ options.plugins.push(
134
+ url({
135
+ limit: Infinity,
136
+ include: ['**/*.woff', '**/*.woff2'],
137
+ })
138
+ );
139
+ // options.output.sourcemap = true;
140
+ options.plugins.push(builtins());
141
+ options.plugins.push(json());
142
+ options.plugins.push(terser.terser());
143
+ return options;
144
+ }
145
+
146
+ module.exports = getRollupOptions;
@@ -0,0 +1,3 @@
1
+ <svg width="7" height="12" viewBox="0 0 7 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.47054 0.861939C6.59552 0.986958 6.66573 1.1565 6.66573 1.33327C6.66573 1.51005 6.59552 1.67959 6.47054 1.80461L2.27521 5.99994L6.47054 10.1953C6.59198 10.321 6.65917 10.4894 6.65766 10.6642C6.65614 10.839 6.58602 11.0062 6.46242 11.1298C6.33881 11.2534 6.1716 11.3235 5.99681 11.3251C5.82201 11.3266 5.65361 11.2594 5.52787 11.1379L0.861207 6.47127C0.736226 6.34625 0.666016 6.17672 0.666016 5.99994C0.666016 5.82316 0.736226 5.65362 0.861207 5.52861L5.52787 0.861939C5.65289 0.736958 5.82243 0.666748 5.99921 0.666748C6.17598 0.666748 6.34552 0.736958 6.47054 0.861939V0.861939Z" fill="#8B8C9E"/>
3
+ </svg>
@@ -0,0 +1,13 @@
1
+ export const defaultDefinitionArrayValue = {
2
+ code: '',
3
+ name: '',
4
+ version: 0,
5
+ properties: [],
6
+ };
7
+
8
+ export const defaultDefinitionObjectValue = {
9
+ code: '',
10
+ name: '',
11
+ version: 0,
12
+ properties: {},
13
+ };
@@ -0,0 +1,18 @@
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
+ export interface PaginateData<T> {
13
+ collection: T[];
14
+ totalItems: number;
15
+ totalPages: number;
16
+ total?: number;
17
+ pageNumber: number;
18
+ }
@@ -0,0 +1,143 @@
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
+ ANY = 'ANY',
19
+ }
20
+
21
+ export interface Definition<T = Record<string, never>> {
22
+ code: string;
23
+ version: number;
24
+ name: string;
25
+ properties: PropertiesObjectType<T>;
26
+ }
27
+
28
+ export type PropertiesObjectType<T = Record<string, never>> = Record<string, PropertyUnion & T>;
29
+ export type PropertiesArrayType<T = Record<string, never>> = Array<PropertyUnion & T>;
30
+
31
+ export interface CreateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {
32
+ properties: PropertiesArrayType<T>;
33
+ }
34
+ export interface UpdateDefinitionType<T = Record<string, never>> extends Omit<Definition<T>, 'properties'> {
35
+ properties: PropertiesArrayType<T>;
36
+ }
37
+
38
+ export interface Property {
39
+ propertyType: keyof typeof PropertyType | { value: keyof typeof PropertyType };
40
+ name: string;
41
+ defaultValue: unknown;
42
+ defaultValues: unknown[];
43
+ isRequired: boolean;
44
+ isMultiple: boolean;
45
+ sortOrder: number;
46
+ isEnabled: boolean;
47
+ uiSettings: unknown;
48
+ validationNode: unknown;
49
+ // FRONTEND FIELDS
50
+ key?: string;
51
+ }
52
+
53
+ export interface BigDecimalProperty extends Property {
54
+ propertyType: PropertyType.BIG_DECIMAL;
55
+ precisionScale: number;
56
+ roundingMode: keyof typeof RoundingMode;
57
+ }
58
+
59
+ export interface BigIntegerProperty extends Property {
60
+ propertyType: PropertyType.BIG_INTEGER;
61
+ }
62
+
63
+ export interface BooleanProperty extends Property {
64
+ propertyType: PropertyType.BOOLEAN;
65
+ }
66
+
67
+ export interface DateProperty extends Property {
68
+ propertyType: PropertyType.DATE;
69
+ format: string;
70
+ }
71
+
72
+ export interface DateTimeProperty extends Property {
73
+ propertyType: PropertyType.DATE_TIME;
74
+ format: string;
75
+ }
76
+
77
+ export interface DoubleProperty extends Property {
78
+ propertyType: PropertyType.DOUBLE;
79
+ }
80
+
81
+ export interface EntityTypeProperty<T = Record<string, never>> extends Property {
82
+ propertyType: PropertyType.ENTITY;
83
+ properties: PropertiesObjectType<T> | PropertiesArrayType<T>;
84
+ }
85
+
86
+ export interface EntityReferenceProperty extends Property {
87
+ propertyType: PropertyType.ENTITY_REFERENCE;
88
+ definitionCode: string;
89
+ definitionVersion: string;
90
+ labelPropertyCode: string;
91
+ valuePropertyCode: string;
92
+ }
93
+
94
+ export interface FloatProperty extends Property {
95
+ propertyType: PropertyType.FLOAT;
96
+ }
97
+
98
+ export interface StringProperty extends Property {
99
+ propertyType: PropertyType.STRING;
100
+ restrictedValues: string[];
101
+ }
102
+
103
+ export interface IntegerProperty extends Property {
104
+ propertyType: PropertyType.INTEGER;
105
+ }
106
+
107
+ export interface JsonProperty extends Property {
108
+ propertyType: PropertyType.JSON;
109
+ }
110
+
111
+ export interface LongProperty extends Property {
112
+ propertyType: PropertyType.LONG;
113
+ }
114
+
115
+ export interface TimeProperty extends Property {
116
+ propertyType: PropertyType.TIME;
117
+ format: string;
118
+ }
119
+
120
+ export interface AnyProperty extends Property {
121
+ propertyType: PropertyType.ANY;
122
+ }
123
+
124
+ export type PropertyUnion<T = Record<string, never>> =
125
+ | BigDecimalProperty
126
+ | BigIntegerProperty
127
+ | BooleanProperty
128
+ | DateProperty
129
+ | DateTimeProperty
130
+ | DoubleProperty
131
+ | EntityTypeProperty<T>
132
+ | EntityReferenceProperty
133
+ | FloatProperty
134
+ | StringProperty
135
+ | IntegerProperty
136
+ | JsonProperty
137
+ | LongProperty
138
+ | TimeProperty
139
+ | AnyProperty;
140
+
141
+ export const DATE_DEFAULT_FORMAT = 'yyyy-MM-dd';
142
+ export const TIME_DEFAULT_FORMAT = 'HH:mm:ss';
143
+ export const DATE_TIME_DEFAULT_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
@@ -1,3 +1,3 @@
1
- export * from './definition';
2
- export * from './ui';
3
- export * from './common';
1
+ export * from './definition';
2
+ export * from './ui';
3
+ export * from './common';
@@ -0,0 +1,80 @@
1
+ import { PaginateData } from './common';
2
+ import { PropertiesArrayType } from './definition';
3
+ import { ReactNode } from 'react';
4
+
5
+ type PaginateParams = {
6
+ page: string;
7
+ size: string;
8
+ [key: string]: string;
9
+ };
10
+
11
+ export interface FilterField {
12
+ name: string;
13
+ label: string;
14
+ type: 'text' | 'select' | 'autocomplete' | 'date' | 'number' | 'date_time' | 'query_autocomplete';
15
+ value?: unknown;
16
+ multiple?: boolean;
17
+ options?: {
18
+ value: string;
19
+ label: string;
20
+ }[];
21
+ searchBy?: string;
22
+ sortBy?: string;
23
+ labelKey?: string;
24
+ valueKey?: string;
25
+ queryFunction?: (params: PaginateParams) => Promise<PaginateData<unknown>>;
26
+ }
27
+
28
+ export interface Option<T = string> {
29
+ value: T;
30
+ label: string;
31
+ }
32
+
33
+ export type TableDataType = 'id' | 'JSON' | 'JSON_text' | 'JSON_copy' | 'copy' | 'boolean' | 'date' | 'status' | 'array';
34
+
35
+ export type JsonPathPickerProperty = {
36
+ properties: PropertiesArrayType;
37
+ pathPrefix: string;
38
+ title: string;
39
+ };
40
+
41
+ export type CustomPropertyFieldProps = {
42
+ name: string;
43
+ label?: string;
44
+ type: 'text' | 'checkbox' | 'number' | 'select' | 'autocomplete' | 'json';
45
+ decimal?: boolean;
46
+ options?: string[] | { value: unknown; label: string }[];
47
+ required?: boolean;
48
+ };
49
+
50
+ export type PropertyFillType = 'expression' | 'widget' | 'null' | 'string' | 'json_valid' | 'json_notvalid' | 'dem_builder';
51
+
52
+ export type StatusVariant = 'default' | 'success' | 'error' | 'warning';
53
+
54
+ export type ValidateFunc = (value: string) => boolean | string;
55
+
56
+
57
+
58
+ export interface Column<T> {
59
+ id: string;
60
+ label: string;
61
+ align?: 'right' | 'left';
62
+ type?: TableDataType;
63
+ sortKey?: string;
64
+ width?: number;
65
+ renderCell?: (row: Row<T>, rowIndex: number) => ReactNode;
66
+ }
67
+
68
+ export type Row<T> = T & {
69
+ id?: string;
70
+ onClick?: (event: React.MouseEvent<HTMLTableRowElement>) => void;
71
+ };
72
+
73
+ export type Route = {
74
+ name: string;
75
+ main?: boolean;
76
+ icon?: ReactNode;
77
+ link?: string;
78
+ query?: string;
79
+ children?: Route[];
80
+ }