@webiny/app-security-access-management 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f

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 (119) hide show
  1. package/README.md +6 -4
  2. package/components/GroupAutocomplete/graphql.d.ts +1 -1
  3. package/components/GroupAutocomplete/graphql.js +17 -5
  4. package/components/GroupAutocomplete/graphql.js.map +1 -0
  5. package/components/GroupAutocomplete/index.d.ts +5 -2
  6. package/components/GroupAutocomplete/index.js +10 -8
  7. package/components/GroupAutocomplete/index.js.map +1 -0
  8. package/components/GroupsMultiAutocomplete/graphql.d.ts +1 -0
  9. package/components/GroupsMultiAutocomplete/graphql.js +23 -0
  10. package/components/GroupsMultiAutocomplete/graphql.js.map +1 -0
  11. package/components/GroupsMultiAutocomplete/index.d.ts +5 -0
  12. package/components/GroupsMultiAutocomplete/index.js +19 -0
  13. package/components/GroupsMultiAutocomplete/index.js.map +1 -0
  14. package/components/NotAuthorizedError/NotAuthorizedError.d.ts +2 -2
  15. package/components/NotAuthorizedError/NotAuthorizedError.js +17 -44
  16. package/components/NotAuthorizedError/NotAuthorizedError.js.map +1 -0
  17. package/components/NotAuthorizedError/index.js +3 -1
  18. package/components/NotAuthorizedError/index.js.map +1 -0
  19. package/components/TeamAutocomplete/graphql.d.ts +1 -0
  20. package/components/TeamAutocomplete/graphql.js +18 -0
  21. package/components/TeamAutocomplete/graphql.js.map +1 -0
  22. package/components/TeamAutocomplete/index.d.ts +5 -0
  23. package/components/TeamAutocomplete/index.js +18 -0
  24. package/components/TeamAutocomplete/index.js.map +1 -0
  25. package/components/TeamsMultiAutocomplete/graphql.d.ts +1 -0
  26. package/components/TeamsMultiAutocomplete/graphql.js +23 -0
  27. package/components/TeamsMultiAutocomplete/graphql.js.map +1 -0
  28. package/components/TeamsMultiAutocomplete/index.d.ts +5 -0
  29. package/components/TeamsMultiAutocomplete/index.js +19 -0
  30. package/components/TeamsMultiAutocomplete/index.js.map +1 -0
  31. package/index.d.ts +2 -2
  32. package/index.js +83 -4
  33. package/index.js.map +1 -0
  34. package/package.json +24 -37
  35. package/plugins/constants.d.ts +1 -0
  36. package/plugins/constants.js +6 -4
  37. package/plugins/constants.js.map +1 -0
  38. package/plugins/index.d.ts +1 -1
  39. package/plugins/index.js +3 -5
  40. package/plugins/index.js.map +1 -0
  41. package/plugins/installation.d.ts +1 -1
  42. package/plugins/installation.js +68 -67
  43. package/plugins/installation.js.map +1 -0
  44. package/plugins/permissionRenderer/SecurityPermissions.d.ts +8 -5
  45. package/plugins/permissionRenderer/SecurityPermissions.js +93 -94
  46. package/plugins/permissionRenderer/SecurityPermissions.js.map +1 -0
  47. package/plugins/permissionRenderer/index.js +14 -13
  48. package/plugins/permissionRenderer/index.js.map +1 -0
  49. package/plugins/routes.d.ts +1 -1
  50. package/plugins/routes.js +14 -16
  51. package/plugins/routes.js.map +1 -0
  52. package/plugins/secureRouteError.d.ts +2 -2
  53. package/plugins/secureRouteError.js +5 -3
  54. package/plugins/secureRouteError.js.map +1 -0
  55. package/types.d.ts +28 -0
  56. package/types.js +3 -0
  57. package/types.js.map +1 -0
  58. package/ui/elements/GroupAutocompleteElement.d.ts +2 -1
  59. package/ui/elements/GroupAutocompleteElement.js +27 -30
  60. package/ui/elements/GroupAutocompleteElement.js.map +1 -0
  61. package/ui/elements/GroupsMultiAutocompleteElement.d.ts +6 -0
  62. package/ui/elements/GroupsMultiAutocompleteElement.js +32 -0
  63. package/ui/elements/GroupsMultiAutocompleteElement.js.map +1 -0
  64. package/ui/elements/TeamAutocompleteElement.d.ts +6 -0
  65. package/ui/elements/TeamAutocompleteElement.js +32 -0
  66. package/ui/elements/TeamAutocompleteElement.js.map +1 -0
  67. package/ui/views/ApiKeys/ApiKeyForm.d.ts +5 -3
  68. package/ui/views/ApiKeys/ApiKeyForm.js +125 -183
  69. package/ui/views/ApiKeys/ApiKeyForm.js.map +1 -0
  70. package/ui/views/ApiKeys/ApiKeys.d.ts +8 -3
  71. package/ui/views/ApiKeys/ApiKeys.js +7 -7
  72. package/ui/views/ApiKeys/ApiKeys.js.map +1 -0
  73. package/ui/views/ApiKeys/ApiKeysDataList.d.ts +5 -3
  74. package/ui/views/ApiKeys/ApiKeysDataList.js +105 -169
  75. package/ui/views/ApiKeys/ApiKeysDataList.js.map +1 -0
  76. package/ui/views/ApiKeys/graphql.d.ts +13 -5
  77. package/ui/views/ApiKeys/graphql.js +81 -10
  78. package/ui/views/ApiKeys/graphql.js.map +1 -0
  79. package/ui/views/ApiKeys/index.d.ts +1 -1
  80. package/ui/views/ApiKeys/index.js +3 -1
  81. package/ui/views/ApiKeys/index.js.map +1 -0
  82. package/ui/views/ApiKeys/utils.d.ts +2 -1
  83. package/ui/views/ApiKeys/utils.js +6 -5
  84. package/ui/views/ApiKeys/utils.js.map +1 -0
  85. package/ui/views/Groups/Groups.d.ts +8 -3
  86. package/ui/views/Groups/Groups.js +8 -8
  87. package/ui/views/Groups/Groups.js.map +1 -0
  88. package/ui/views/Groups/GroupsDataList.d.ts +5 -3
  89. package/ui/views/Groups/GroupsDataList.js +110 -176
  90. package/ui/views/Groups/GroupsDataList.js.map +1 -0
  91. package/ui/views/Groups/GroupsForm.d.ts +5 -3
  92. package/ui/views/Groups/GroupsForm.js +150 -170
  93. package/ui/views/Groups/GroupsForm.js.map +1 -0
  94. package/ui/views/Groups/graphql.d.ts +13 -5
  95. package/ui/views/Groups/graphql.js +84 -10
  96. package/ui/views/Groups/graphql.js.map +1 -0
  97. package/ui/views/Groups/index.d.ts +1 -1
  98. package/ui/views/Groups/index.js +3 -1
  99. package/ui/views/Groups/index.js.map +1 -0
  100. package/ui/views/Teams/Teams.d.ts +8 -0
  101. package/ui/views/Teams/Teams.js +12 -0
  102. package/ui/views/Teams/Teams.js.map +1 -0
  103. package/ui/views/Teams/TeamsDataList.d.ts +5 -0
  104. package/ui/views/Teams/TeamsDataList.js +151 -0
  105. package/ui/views/Teams/TeamsDataList.js.map +1 -0
  106. package/ui/views/Teams/TeamsForm.d.ts +5 -0
  107. package/ui/views/Teams/TeamsForm.js +173 -0
  108. package/ui/views/Teams/TeamsForm.js.map +1 -0
  109. package/ui/views/Teams/graphql.d.ts +13 -0
  110. package/ui/views/Teams/graphql.js +89 -0
  111. package/ui/views/Teams/graphql.js.map +1 -0
  112. package/ui/views/Teams/index.d.ts +1 -0
  113. package/ui/views/Teams/index.js +3 -0
  114. package/ui/views/Teams/index.js.map +1 -0
  115. package/ui/views/utils.d.ts +3 -2
  116. package/ui/views/utils.js +6 -23
  117. package/ui/views/utils.js.map +1 -0
  118. package/plugins/menus.d.ts +0 -4
  119. package/plugins/menus.js +0 -61
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Helmet","Route","AdminLayout","SecureRoute","Groups","ApiKeys","Permission","plugins","name","type","route","createElement","exact","path","render","permission","title"],"sources":["routes.tsx"],"sourcesContent":["import React from \"react\";\nimport Helmet from \"react-helmet\";\nimport { Route } from \"@webiny/react-router\";\nimport { AdminLayout } from \"@webiny/app-admin/components/AdminLayout\";\nimport { SecureRoute } from \"@webiny/app-security/components\";\nimport type { RoutePlugin } from \"@webiny/app/types\";\nimport { Groups } from \"~/ui/views/Groups\";\nimport { ApiKeys } from \"~/ui/views/ApiKeys\";\nimport { Permission } from \"./constants\";\n\nconst plugins: RoutePlugin[] = [\n {\n name: \"route-security-groups\",\n type: \"route\",\n route: (\n <Route\n exact\n path={\"/access-management/groups\"}\n render={() => (\n <SecureRoute permission={Permission.Groups}>\n <AdminLayout>\n <Helmet title={\"Access Management - Groups\"} />\n <Groups />\n </AdminLayout>\n </SecureRoute>\n )}\n />\n )\n },\n {\n name: \"route-security-api-keys\",\n type: \"route\",\n route: (\n <Route\n exact\n path={\"/access-management/api-keys\"}\n render={() => (\n <SecureRoute permission={Permission.ApiKeys}>\n <AdminLayout title={\"Access Management - API Keys\"}>\n <ApiKeys />\n </AdminLayout>\n </SecureRoute>\n )}\n />\n )\n }\n];\n\nexport default plugins;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,KAAK,QAAQ,sBAAsB;AAC5C,SAASC,WAAW,QAAQ,0CAA0C;AACtE,SAASC,WAAW,QAAQ,iCAAiC;AAE7D,SAASC,MAAM;AACf,SAASC,OAAO;AAChB,SAASC,UAAU;AAEnB,MAAMC,OAAsB,GAAG,CAC3B;EACIC,IAAI,EAAE,uBAAuB;EAC7BC,IAAI,EAAE,OAAO;EACbC,KAAK,eACDX,KAAA,CAAAY,aAAA,CAACV,KAAK;IACFW,KAAK;IACLC,IAAI,EAAE,2BAA4B;IAClCC,MAAM,EAAEA,CAAA,kBACJf,KAAA,CAAAY,aAAA,CAACR,WAAW;MAACY,UAAU,EAAET,UAAU,CAACF;IAAO,gBACvCL,KAAA,CAAAY,aAAA,CAACT,WAAW,qBACRH,KAAA,CAAAY,aAAA,CAACX,MAAM;MAACgB,KAAK,EAAE;IAA6B,CAAE,CAAC,eAC/CjB,KAAA,CAAAY,aAAA,CAACP,MAAM,MAAE,CACA,CACJ;EACf,CACL;AAET,CAAC,EACD;EACII,IAAI,EAAE,yBAAyB;EAC/BC,IAAI,EAAE,OAAO;EACbC,KAAK,eACDX,KAAA,CAAAY,aAAA,CAACV,KAAK;IACFW,KAAK;IACLC,IAAI,EAAE,6BAA8B;IACpCC,MAAM,EAAEA,CAAA,kBACJf,KAAA,CAAAY,aAAA,CAACR,WAAW;MAACY,UAAU,EAAET,UAAU,CAACD;IAAQ,gBACxCN,KAAA,CAAAY,aAAA,CAACT,WAAW;MAACc,KAAK,EAAE;IAA+B,gBAC/CjB,KAAA,CAAAY,aAAA,CAACN,OAAO,MAAE,CACD,CACJ;EACf,CACL;AAET,CAAC,CACJ;AAED,eAAeE,OAAO","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { Plugin } from "@webiny/plugins/types";
3
- declare type SecureRouteErrorPlugin = Plugin & {
2
+ import type { Plugin } from "@webiny/plugins/types";
3
+ type SecureRouteErrorPlugin = Plugin & {
4
4
  render: () => React.ReactNode;
5
5
  };
6
6
  declare const plugin: SecureRouteErrorPlugin;
@@ -1,10 +1,12 @@
1
1
  import * as React from "react";
2
2
  import { NotAuthorizedError } from "../components/NotAuthorizedError";
3
- var plugin = {
3
+ const plugin = {
4
4
  type: "secure-route-error",
5
5
  name: "secure-route-error",
6
- render: function render() {
6
+ render() {
7
7
  return /*#__PURE__*/React.createElement(NotAuthorizedError, null);
8
8
  }
9
9
  };
10
- export default plugin;
10
+ export default plugin;
11
+
12
+ //# sourceMappingURL=secureRouteError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","NotAuthorizedError","plugin","type","name","render","createElement"],"sources":["secureRouteError.tsx"],"sourcesContent":["import * as React from \"react\";\nimport type { Plugin } from \"@webiny/plugins/types\";\nimport { NotAuthorizedError } from \"~/components/NotAuthorizedError\";\n\ntype SecureRouteErrorPlugin = Plugin & { render: () => React.ReactNode };\n\nconst plugin: SecureRouteErrorPlugin = {\n type: \"secure-route-error\",\n name: \"secure-route-error\",\n render(): React.ReactElement {\n return <NotAuthorizedError />;\n }\n};\n\nexport default plugin;\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,kBAAkB;AAI3B,MAAMC,MAA8B,GAAG;EACnCC,IAAI,EAAE,oBAAoB;EAC1BC,IAAI,EAAE,oBAAoB;EAC1BC,MAAMA,CAAA,EAAuB;IACzB,oBAAOL,KAAA,CAAAM,aAAA,CAACL,kBAAkB,MAAE,CAAC;EACjC;AACJ,CAAC;AAED,eAAeC,MAAM","ignoreList":[]}
package/types.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ import type { SecurityPermission } from "@webiny/app-security/types";
2
+ export interface Group {
3
+ id: string;
4
+ name: string;
5
+ description: string;
6
+ slug: string;
7
+ system?: boolean;
8
+ plugin: boolean | null;
9
+ permissions: SecurityPermission[];
10
+ createdOn: string;
11
+ }
12
+ export interface Team {
13
+ id: string;
14
+ name: string;
15
+ description: string;
16
+ slug: string;
17
+ system?: boolean;
18
+ plugin: boolean | null;
19
+ createdOn: string;
20
+ }
21
+ export interface ApiKey {
22
+ id: string;
23
+ token: string;
24
+ name: string;
25
+ description: string;
26
+ permissions: SecurityPermission[];
27
+ createdOn: string;
28
+ }
package/types.js ADDED
@@ -0,0 +1,3 @@
1
+ export {};
2
+
3
+ //# sourceMappingURL=types.js.map
package/types.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { SecurityPermission } from \"@webiny/app-security/types\";\n\nexport interface Group {\n id: string;\n name: string;\n description: string;\n slug: string;\n system?: boolean;\n plugin: boolean | null;\n permissions: SecurityPermission[];\n createdOn: string;\n}\n\nexport interface Team {\n id: string;\n name: string;\n description: string;\n slug: string;\n system?: boolean;\n plugin: boolean | null;\n createdOn: string;\n}\n\nexport interface ApiKey {\n id: string;\n token: string;\n name: string;\n description: string;\n permissions: SecurityPermission[];\n createdOn: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { InputElement } from "@webiny/app-admin/ui/elements/form/InputElement";
3
+ import type { FormFieldElementRenderProps } from "@webiny/app-admin/ui/elements/form/FormFieldElement";
3
4
  export declare class GroupAutocompleteElement extends InputElement {
4
- render({ formProps }: any): React.ReactElement;
5
+ render(props: FormFieldElementRenderProps): React.ReactElement;
5
6
  }
@@ -1,35 +1,32 @@
1
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
- import _createSuper from "@babel/runtime/helpers/createSuper";
5
1
  import React from "react";
6
2
  import { InputElement } from "@webiny/app-admin/ui/elements/form/InputElement";
7
3
  import { GroupAutocomplete } from "../../components/GroupAutocomplete";
8
- export var GroupAutocompleteElement = /*#__PURE__*/function (_InputElement) {
9
- _inherits(GroupAutocompleteElement, _InputElement);
10
-
11
- var _super = _createSuper(GroupAutocompleteElement);
12
-
13
- function GroupAutocompleteElement() {
14
- _classCallCheck(this, GroupAutocompleteElement);
15
-
16
- return _super.apply(this, arguments);
17
- }
18
-
19
- _createClass(GroupAutocompleteElement, [{
20
- key: "render",
21
- value: function render(_ref) {
22
- var formProps = _ref.formProps;
23
- var _ref2 = formProps,
24
- Bind = _ref2.Bind;
25
- return /*#__PURE__*/React.createElement(Bind, {
26
- name: this.id,
27
- validators: this.config.validators
28
- }, /*#__PURE__*/React.createElement(GroupAutocomplete, {
29
- label: "Group"
30
- }));
4
+ export class GroupAutocompleteElement extends InputElement {
5
+ render(props) {
6
+ const {
7
+ formProps
8
+ } = props;
9
+ const {
10
+ Bind
11
+ } = formProps;
12
+ const validators = this.config.validators;
13
+ /**
14
+ * TODO @ts-refactor @bruno
15
+ * Figure out what can validators be.
16
+ */
17
+ if (validators && typeof validators !== "function") {
18
+ console.log("packages/app-security-access-management/src/ui/elements/GroupAutocompleteElement.tsx validators is set but not a function.");
19
+ console.log(validators);
31
20
  }
32
- }]);
21
+ return /*#__PURE__*/React.createElement(Bind, {
22
+ name: this.id,
23
+ validators: typeof validators === "function" ? validators({
24
+ formProps
25
+ }) : []
26
+ }, /*#__PURE__*/React.createElement(GroupAutocomplete, {
27
+ label: "Group"
28
+ }));
29
+ }
30
+ }
33
31
 
34
- return GroupAutocompleteElement;
35
- }(InputElement);
32
+ //# sourceMappingURL=GroupAutocompleteElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","InputElement","GroupAutocomplete","GroupAutocompleteElement","render","props","formProps","Bind","validators","config","console","log","createElement","name","id","label"],"sources":["GroupAutocompleteElement.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormRenderPropParams } from \"@webiny/form\";\nimport { InputElement } from \"@webiny/app-admin/ui/elements/form/InputElement\";\nimport { GroupAutocomplete } from \"~/components/GroupAutocomplete\";\nimport type { FormFieldElementRenderProps } from \"@webiny/app-admin/ui/elements/form/FormFieldElement\";\n\nexport class GroupAutocompleteElement extends InputElement {\n public override render(props: FormFieldElementRenderProps): React.ReactElement {\n const { formProps } = props;\n const { Bind } = formProps as FormRenderPropParams;\n const validators = this.config.validators;\n /**\n * TODO @ts-refactor @bruno\n * Figure out what can validators be.\n */\n if (validators && typeof validators !== \"function\") {\n console.log(\n \"packages/app-security-access-management/src/ui/elements/GroupAutocompleteElement.tsx validators is set but not a function.\"\n );\n console.log(validators);\n }\n return (\n <Bind\n name={this.id}\n validators={typeof validators === \"function\" ? validators({ formProps }) : []}\n >\n <GroupAutocomplete label={\"Group\"} />\n </Bind>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,iDAAiD;AAC9E,SAASC,iBAAiB;AAG1B,OAAO,MAAMC,wBAAwB,SAASF,YAAY,CAAC;EACvCG,MAAMA,CAACC,KAAkC,EAAsB;IAC3E,MAAM;MAAEC;IAAU,CAAC,GAAGD,KAAK;IAC3B,MAAM;MAAEE;IAAK,CAAC,GAAGD,SAAiC;IAClD,MAAME,UAAU,GAAG,IAAI,CAACC,MAAM,CAACD,UAAU;IACzC;AACR;AACA;AACA;IACQ,IAAIA,UAAU,IAAI,OAAOA,UAAU,KAAK,UAAU,EAAE;MAChDE,OAAO,CAACC,GAAG,CACP,4HACJ,CAAC;MACDD,OAAO,CAACC,GAAG,CAACH,UAAU,CAAC;IAC3B;IACA,oBACIR,KAAA,CAAAY,aAAA,CAACL,IAAI;MACDM,IAAI,EAAE,IAAI,CAACC,EAAG;MACdN,UAAU,EAAE,OAAOA,UAAU,KAAK,UAAU,GAAGA,UAAU,CAAC;QAAEF;MAAU,CAAC,CAAC,GAAG;IAAG,gBAE9EN,KAAA,CAAAY,aAAA,CAACV,iBAAiB;MAACa,KAAK,EAAE;IAAQ,CAAE,CAClC,CAAC;EAEf;AACJ","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { InputElement } from "@webiny/app-admin/ui/elements/form/InputElement";
3
+ import type { FormFieldElementRenderProps } from "@webiny/app-admin/ui/elements/form/FormFieldElement";
4
+ export declare class GroupsAutocompleteElement extends InputElement {
5
+ render(props: FormFieldElementRenderProps): React.ReactElement;
6
+ }
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import { InputElement } from "@webiny/app-admin/ui/elements/form/InputElement";
3
+ import { GroupsMultiAutocomplete } from "../../components/GroupsMultiAutocomplete";
4
+ export class GroupsAutocompleteElement extends InputElement {
5
+ render(props) {
6
+ const {
7
+ formProps
8
+ } = props;
9
+ const {
10
+ Bind
11
+ } = formProps;
12
+ const validators = this.config.validators;
13
+ /**
14
+ * TODO @ts-refactor @bruno
15
+ * Figure out what can validators be.
16
+ */
17
+ if (validators && typeof validators !== "function") {
18
+ console.log("packages/app-security-access-management/src/ui/elements/GroupsAutocompleteElement.tsx validators is set but not a function.");
19
+ console.log(validators);
20
+ }
21
+ return /*#__PURE__*/React.createElement(Bind, {
22
+ name: this.id,
23
+ validators: typeof validators === "function" ? validators({
24
+ formProps
25
+ }) : []
26
+ }, /*#__PURE__*/React.createElement(GroupsMultiAutocomplete, {
27
+ label: "Groups"
28
+ }));
29
+ }
30
+ }
31
+
32
+ //# sourceMappingURL=GroupsMultiAutocompleteElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","InputElement","GroupsMultiAutocomplete","GroupsAutocompleteElement","render","props","formProps","Bind","validators","config","console","log","createElement","name","id","label"],"sources":["GroupsMultiAutocompleteElement.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormRenderPropParams } from \"@webiny/form\";\nimport { InputElement } from \"@webiny/app-admin/ui/elements/form/InputElement\";\nimport { GroupsMultiAutocomplete } from \"~/components/GroupsMultiAutocomplete\";\nimport type { FormFieldElementRenderProps } from \"@webiny/app-admin/ui/elements/form/FormFieldElement\";\n\nexport class GroupsAutocompleteElement extends InputElement {\n public override render(props: FormFieldElementRenderProps): React.ReactElement {\n const { formProps } = props;\n const { Bind } = formProps as FormRenderPropParams;\n const validators = this.config.validators;\n /**\n * TODO @ts-refactor @bruno\n * Figure out what can validators be.\n */\n if (validators && typeof validators !== \"function\") {\n console.log(\n \"packages/app-security-access-management/src/ui/elements/GroupsAutocompleteElement.tsx validators is set but not a function.\"\n );\n console.log(validators);\n }\n return (\n <Bind\n name={this.id}\n validators={typeof validators === \"function\" ? validators({ formProps }) : []}\n >\n <GroupsMultiAutocomplete label={\"Groups\"} />\n </Bind>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,iDAAiD;AAC9E,SAASC,uBAAuB;AAGhC,OAAO,MAAMC,yBAAyB,SAASF,YAAY,CAAC;EACxCG,MAAMA,CAACC,KAAkC,EAAsB;IAC3E,MAAM;MAAEC;IAAU,CAAC,GAAGD,KAAK;IAC3B,MAAM;MAAEE;IAAK,CAAC,GAAGD,SAAiC;IAClD,MAAME,UAAU,GAAG,IAAI,CAACC,MAAM,CAACD,UAAU;IACzC;AACR;AACA;AACA;IACQ,IAAIA,UAAU,IAAI,OAAOA,UAAU,KAAK,UAAU,EAAE;MAChDE,OAAO,CAACC,GAAG,CACP,6HACJ,CAAC;MACDD,OAAO,CAACC,GAAG,CAACH,UAAU,CAAC;IAC3B;IACA,oBACIR,KAAA,CAAAY,aAAA,CAACL,IAAI;MACDM,IAAI,EAAE,IAAI,CAACC,EAAG;MACdN,UAAU,EAAE,OAAOA,UAAU,KAAK,UAAU,GAAGA,UAAU,CAAC;QAAEF;MAAU,CAAC,CAAC,GAAG;IAAG,gBAE9EN,KAAA,CAAAY,aAAA,CAACV,uBAAuB;MAACa,KAAK,EAAE;IAAS,CAAE,CACzC,CAAC;EAEf;AACJ","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { InputElement } from "@webiny/app-admin/ui/elements/form/InputElement";
3
+ import type { FormFieldElementRenderProps } from "@webiny/app-admin/ui/elements/form/FormFieldElement";
4
+ export declare class TeamAutocompleteElement extends InputElement {
5
+ render(props: FormFieldElementRenderProps): React.ReactElement;
6
+ }
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import { InputElement } from "@webiny/app-admin/ui/elements/form/InputElement";
3
+ import { TeamAutocomplete } from "../../components/TeamAutocomplete";
4
+ export class TeamAutocompleteElement extends InputElement {
5
+ render(props) {
6
+ const {
7
+ formProps
8
+ } = props;
9
+ const {
10
+ Bind
11
+ } = formProps;
12
+ const validators = this.config.validators;
13
+ /**
14
+ * TODO @ts-refactor @bruno
15
+ * Figure out what can validators be.
16
+ */
17
+ if (validators && typeof validators !== "function") {
18
+ console.log("packages/app-security-access-management/src/ui/elements/TeamAutocompleteElement.tsx validators is set but not a function.");
19
+ console.log(validators);
20
+ }
21
+ return /*#__PURE__*/React.createElement(Bind, {
22
+ name: this.id,
23
+ validators: typeof validators === "function" ? validators({
24
+ formProps
25
+ }) : []
26
+ }, /*#__PURE__*/React.createElement(TeamAutocomplete, {
27
+ label: "Team"
28
+ }));
29
+ }
30
+ }
31
+
32
+ //# sourceMappingURL=TeamAutocompleteElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","InputElement","TeamAutocomplete","TeamAutocompleteElement","render","props","formProps","Bind","validators","config","console","log","createElement","name","id","label"],"sources":["TeamAutocompleteElement.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormRenderPropParams } from \"@webiny/form\";\nimport { InputElement } from \"@webiny/app-admin/ui/elements/form/InputElement\";\nimport { TeamAutocomplete } from \"~/components/TeamAutocomplete\";\nimport type { FormFieldElementRenderProps } from \"@webiny/app-admin/ui/elements/form/FormFieldElement\";\n\nexport class TeamAutocompleteElement extends InputElement {\n public override render(props: FormFieldElementRenderProps): React.ReactElement {\n const { formProps } = props;\n const { Bind } = formProps as FormRenderPropParams;\n const validators = this.config.validators;\n /**\n * TODO @ts-refactor @bruno\n * Figure out what can validators be.\n */\n if (validators && typeof validators !== \"function\") {\n console.log(\n \"packages/app-security-access-management/src/ui/elements/TeamAutocompleteElement.tsx validators is set but not a function.\"\n );\n console.log(validators);\n }\n return (\n <Bind\n name={this.id}\n validators={typeof validators === \"function\" ? validators({ formProps }) : []}\n >\n <TeamAutocomplete label={\"Team\"} />\n </Bind>\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,YAAY,QAAQ,iDAAiD;AAC9E,SAASC,gBAAgB;AAGzB,OAAO,MAAMC,uBAAuB,SAASF,YAAY,CAAC;EACtCG,MAAMA,CAACC,KAAkC,EAAsB;IAC3E,MAAM;MAAEC;IAAU,CAAC,GAAGD,KAAK;IAC3B,MAAM;MAAEE;IAAK,CAAC,GAAGD,SAAiC;IAClD,MAAME,UAAU,GAAG,IAAI,CAACC,MAAM,CAACD,UAAU;IACzC;AACR;AACA;AACA;IACQ,IAAIA,UAAU,IAAI,OAAOA,UAAU,KAAK,UAAU,EAAE;MAChDE,OAAO,CAACC,GAAG,CACP,2HACJ,CAAC;MACDD,OAAO,CAACC,GAAG,CAACH,UAAU,CAAC;IAC3B;IACA,oBACIR,KAAA,CAAAY,aAAA,CAACL,IAAI;MACDM,IAAI,EAAE,IAAI,CAACC,EAAG;MACdN,UAAU,EAAE,OAAOA,UAAU,KAAK,UAAU,GAAGA,UAAU,CAAC;QAAEF;MAAU,CAAC,CAAC,GAAG;IAAG,gBAE9EN,KAAA,CAAAY,aAAA,CAACV,gBAAgB;MAACa,KAAK,EAAE;IAAO,CAAE,CAChC,CAAC;EAEf;AACJ","ignoreList":[]}
@@ -1,3 +1,5 @@
1
- /// <reference types="react" />
2
- declare const ApiKeyForm: () => JSX.Element;
3
- export default ApiKeyForm;
1
+ import React from "react";
2
+ export interface ApiKeyFormProps {
3
+ [key: string]: any;
4
+ }
5
+ export declare const ApiKeyForm: () => React.JSX.Element;