@webiny/app-admin 0.0.0-unstable.df7a8bb475 → 0.0.0-unstable.e2758ee1cf
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.
- package/base/Admin.js +3 -1
- package/base/Admin.js.map +1 -1
- package/base/Base/LexicalPreset.js +4 -5
- package/base/Base/LexicalPreset.js.map +1 -1
- package/base/Base/Menus.js +28 -18
- package/base/Base/Menus.js.map +1 -1
- package/base/Base.js +1 -2
- package/base/Base.js.map +1 -1
- package/components/DeveloperMode/DeveloperMode.d.ts +11 -0
- package/components/DeveloperMode/DeveloperMode.js +17 -0
- package/components/DeveloperMode/DeveloperMode.js.map +1 -0
- package/components/DeveloperMode/index.d.ts +2 -0
- package/components/DeveloperMode/index.js +3 -0
- package/components/DeveloperMode/index.js.map +1 -0
- package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
- package/components/LexicalEditor/LexicalLinkForm.js +92 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +1 -0
- package/components/LexicalEditor/index.js +1 -0
- package/components/LexicalEditor/index.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +1 -3
- package/components/Permissions/Permissions.js +37 -31
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +1 -1
- package/components/Wcp.d.ts +2 -0
- package/components/Wcp.js +8 -1
- package/components/Wcp.js.map +1 -1
- package/components/index.d.ts +4 -1
- package/components/index.js +3 -1
- package/components/index.js.map +1 -1
- package/config/AdminConfig/Security.d.ts +3 -0
- package/config/AdminConfig/Security.js +6 -0
- package/config/AdminConfig/Security.js.map +1 -0
- package/config/AdminConfig/SecurityPermissions.d.ts +17 -0
- package/config/AdminConfig/SecurityPermissions.js +31 -0
- package/config/AdminConfig/SecurityPermissions.js.map +1 -0
- package/config/AdminConfig.d.ts +8 -1
- package/config/AdminConfig.js +8 -3
- package/config/AdminConfig.js.map +1 -1
- package/domain/Identity.js +1 -1
- package/domain/Identity.js.map +1 -1
- package/exports/admin/{buildParams.js → build-params.js} +1 -1
- package/exports/admin/build-params.js.map +1 -0
- package/exports/admin/form.d.ts +11 -0
- package/exports/admin/form.js +12 -0
- package/exports/admin/form.js.map +1 -0
- package/exports/admin/ui.d.ts +1 -0
- package/exports/admin/ui.js +1 -0
- package/exports/admin/ui.js.map +1 -1
- package/exports/admin.d.ts +4 -0
- package/exports/admin.js +4 -0
- package/exports/admin.js.map +1 -1
- package/features/wcp/ReactLicense.d.ts +1 -0
- package/features/wcp/ReactLicense.js +3 -0
- package/features/wcp/ReactLicense.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +26 -29
- package/permissions/PermissionRenderer.d.ts +6 -0
- package/permissions/PermissionRenderer.js +219 -0
- package/permissions/PermissionRenderer.js.map +1 -0
- package/permissions/PermissionValueContext.d.ts +11 -0
- package/permissions/PermissionValueContext.js +23 -0
- package/permissions/PermissionValueContext.js.map +1 -0
- package/permissions/createHasPermission.d.ts +3 -0
- package/permissions/createHasPermission.js +36 -0
- package/permissions/createHasPermission.js.map +1 -0
- package/permissions/createPermissionSchema.d.ts +2 -0
- package/permissions/createPermissionSchema.js +8 -0
- package/permissions/createPermissionSchema.js.map +1 -0
- package/permissions/index.d.ts +8 -0
- package/permissions/index.js +8 -0
- package/permissions/index.js.map +1 -0
- package/permissions/types.d.ts +242 -0
- package/permissions/types.js +3 -0
- package/permissions/types.js.map +1 -0
- package/permissions/usePermissionForm.d.ts +17 -0
- package/permissions/usePermissionForm.js +256 -0
- package/permissions/usePermissionForm.js.map +1 -0
- package/permissions/usePermissions.d.ts +3 -0
- package/permissions/usePermissions.js +180 -0
- package/permissions/usePermissions.js.map +1 -0
- package/types.d.ts +0 -7
- package/types.js.map +1 -1
- package/base/Base/LexicalPreset/LinkEditForm.d.ts +0 -6
- package/base/Base/LexicalPreset/LinkEditForm.js +0 -63
- package/base/Base/LexicalPreset/LinkEditForm.js.map +0 -1
- package/exports/admin/buildParams.js.map +0 -1
- package/extensions/AdminBuildParam.d.ts +0 -11
- package/extensions/AdminBuildParam.js +0 -184
- package/extensions/AdminBuildParam.js.map +0 -1
- package/extensions/AdminExtension.d.ts +0 -11
- package/extensions/AdminExtension.js +0 -105
- package/extensions/AdminExtension.js.map +0 -1
- package/extensions/index.d.ts +0 -23
- package/extensions/index.js +0 -7
- package/extensions/index.js.map +0 -1
- package/plugins/PermissionRendererPlugin.d.ts +0 -22
- package/plugins/PermissionRendererPlugin.js +0 -19
- package/plugins/PermissionRendererPlugin.js.map +0 -1
- /package/exports/admin/{buildParams.d.ts → build-params.d.ts} +0 -0
package/components/Wcp.js
CHANGED
|
@@ -24,11 +24,18 @@ function CanUseWorkflows({
|
|
|
24
24
|
const wcp = useWcp();
|
|
25
25
|
return wcp.canUseWorkflows() ? /*#__PURE__*/React.createElement(React.Fragment, null, children) : null;
|
|
26
26
|
}
|
|
27
|
+
function CanUseHcmsFieldPermissions({
|
|
28
|
+
children
|
|
29
|
+
}) {
|
|
30
|
+
const wcp = useWcp();
|
|
31
|
+
return wcp.canUseHcmsFieldPermissions() ? /*#__PURE__*/React.createElement(React.Fragment, null, children) : null;
|
|
32
|
+
}
|
|
27
33
|
export const Wcp = {
|
|
28
34
|
CanUseTeams,
|
|
29
35
|
CanUsePrivateFiles,
|
|
30
36
|
CanUseFileManagerThreatDetection,
|
|
31
|
-
CanUseWorkflows
|
|
37
|
+
CanUseWorkflows,
|
|
38
|
+
CanUseHcmsFieldPermissions
|
|
32
39
|
};
|
|
33
40
|
|
|
34
41
|
//# sourceMappingURL=Wcp.js.map
|
package/components/Wcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useWcp","CanUseTeams","children","wcp","canUseTeams","createElement","Fragment","CanUsePrivateFiles","canUsePrivateFiles","CanUseFileManagerThreatDetection","canUseFileManagerThreatDetection","CanUseWorkflows","canUseWorkflows","Wcp"],"sources":["Wcp.tsx"],"sourcesContent":["import React from \"react\";\nimport { useWcp } from \"~/presentation/wcp/useWcp.js\";\n\ninterface ChildrenProps {\n children: React.ReactNode;\n}\n\nfunction CanUseTeams({ children }: ChildrenProps) {\n const wcp = useWcp();\n
|
|
1
|
+
{"version":3,"names":["React","useWcp","CanUseTeams","children","wcp","canUseTeams","createElement","Fragment","CanUsePrivateFiles","canUsePrivateFiles","CanUseFileManagerThreatDetection","canUseFileManagerThreatDetection","CanUseWorkflows","canUseWorkflows","CanUseHcmsFieldPermissions","canUseHcmsFieldPermissions","Wcp"],"sources":["Wcp.tsx"],"sourcesContent":["import React from \"react\";\nimport { useWcp } from \"~/presentation/wcp/useWcp.js\";\n\ninterface ChildrenProps {\n children: React.ReactNode;\n}\n\nfunction CanUseTeams({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUseTeams() ? <>{children}</> : null;\n}\n\nfunction CanUsePrivateFiles({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUsePrivateFiles() ? <>{children}</> : null;\n}\n\nfunction CanUseFileManagerThreatDetection({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUseFileManagerThreatDetection() ? <>{children}</> : null;\n}\n\nfunction CanUseWorkflows({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUseWorkflows() ? <>{children}</> : null;\n}\n\nfunction CanUseHcmsFieldPermissions({ children }: ChildrenProps) {\n const wcp = useWcp();\n return wcp.canUseHcmsFieldPermissions() ? <>{children}</> : null;\n}\n\nexport const Wcp = {\n CanUseTeams,\n CanUsePrivateFiles,\n CanUseFileManagerThreatDetection,\n CanUseWorkflows,\n CanUseHcmsFieldPermissions\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM;AAMf,SAASC,WAAWA,CAAC;EAAEC;AAAwB,CAAC,EAAE;EAC9C,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACC,WAAW,CAAC,CAAC,gBAAGL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AACrD;AAEA,SAASK,kBAAkBA,CAAC;EAAEL;AAAwB,CAAC,EAAE;EACrD,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACK,kBAAkB,CAAC,CAAC,gBAAGT,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AAC5D;AAEA,SAASO,gCAAgCA,CAAC;EAAEP;AAAwB,CAAC,EAAE;EACnE,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACO,gCAAgC,CAAC,CAAC,gBAAGX,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AAC1E;AAEA,SAASS,eAAeA,CAAC;EAAET;AAAwB,CAAC,EAAE;EAClD,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACS,eAAe,CAAC,CAAC,gBAAGb,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AACzD;AAEA,SAASW,0BAA0BA,CAAC;EAAEX;AAAwB,CAAC,EAAE;EAC7D,MAAMC,GAAG,GAAGH,MAAM,CAAC,CAAC;EACpB,OAAOG,GAAG,CAACW,0BAA0B,CAAC,CAAC,gBAAGf,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,QAAW,CAAC,GAAG,IAAI;AACpE;AAEA,OAAO,MAAMa,GAAG,GAAG;EACfd,WAAW;EACXM,kBAAkB;EAClBE,gCAAgC;EAChCE,eAAe;EACfE;AACJ,CAAC","ignoreList":[]}
|
package/components/index.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ export { OverlayLayout, type OverlayLayoutProps } from "../components/OverlayLay
|
|
|
12
12
|
export { type EmptyViewProps, EmptyView } from "../components/EmptyView.js";
|
|
13
13
|
export { SimpleFormContent, SimpleForm, SimpleFormFooter, SimpleFormHeader } from "../components/SimpleForm/index.js";
|
|
14
14
|
export { default as SingleImageUpload, type SingleImageUploadProps } from "../components/SingleImageUpload.js";
|
|
15
|
-
export { LexicalEditor } from "../components/LexicalEditor/
|
|
15
|
+
export { LexicalEditor } from "../components/LexicalEditor/index.js";
|
|
16
|
+
export type { RichTextValueWithHtml } from "../components/LexicalEditor/index.js";
|
|
17
|
+
export { LexicalLinkForm } from "../components/LexicalEditor/index.js";
|
|
16
18
|
export { Wcp } from "../components/Wcp.js";
|
|
17
19
|
export * from "../components/IconPicker/index.js";
|
|
18
20
|
export * from "../components/NavigationPrompt.js";
|
|
@@ -25,3 +27,4 @@ export * from "../components/RolesMultiAutocomplete/index.js";
|
|
|
25
27
|
export * from "../components/RoleAutocomplete/index.js";
|
|
26
28
|
export * from "../components/TeamAutocomplete/index.js";
|
|
27
29
|
export * from "../components/TeamsMultiAutocomplete/index.js";
|
|
30
|
+
export * from "./DeveloperMode/index.js";
|
package/components/index.js
CHANGED
|
@@ -12,7 +12,8 @@ export { OverlayLayout } from "./OverlayLayout/index.js";
|
|
|
12
12
|
export { EmptyView } from "./EmptyView.js";
|
|
13
13
|
export { SimpleFormContent, SimpleForm, SimpleFormFooter, SimpleFormHeader } from "./SimpleForm/index.js";
|
|
14
14
|
export { default as SingleImageUpload } from "./SingleImageUpload.js";
|
|
15
|
-
export { LexicalEditor } from "./LexicalEditor/
|
|
15
|
+
export { LexicalEditor } from "./LexicalEditor/index.js";
|
|
16
|
+
export { LexicalLinkForm } from "./LexicalEditor/index.js";
|
|
16
17
|
export { Wcp } from "./Wcp.js";
|
|
17
18
|
export * from "./IconPicker/index.js";
|
|
18
19
|
export * from "./NavigationPrompt.js";
|
|
@@ -25,5 +26,6 @@ export * from "./RolesMultiAutocomplete/index.js";
|
|
|
25
26
|
export * from "./RoleAutocomplete/index.js";
|
|
26
27
|
export * from "./TeamAutocomplete/index.js";
|
|
27
28
|
export * from "./TeamsMultiAutocomplete/index.js";
|
|
29
|
+
export * from "./DeveloperMode/index.js";
|
|
28
30
|
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
package/components/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FileManager","FloatingPanel","StateInspector","NavigationPrompt","DialogsProvider","OverlayLayout","EmptyView","SimpleFormContent","SimpleForm","SimpleFormFooter","SimpleFormHeader","default","SingleImageUpload","LexicalEditor","Wcp","RegisterFeature"],"sources":["index.ts"],"sourcesContent":["export { FileManager } from \"~/base/ui/FileManager.js\";\nexport { FloatingPanel } from \"~/components/FloatingPanel.js\";\nexport { StateInspector } from \"~/components/StateInspector.js\";\nexport { NavigationPrompt } from \"~/components/NavigationPrompt.js\";\nexport * from \"~/components/AdminLayout.js\";\nexport * from \"~/components/Buttons/index.js\";\nexport { DialogsProvider } from \"~/components/Dialogs/DialogsContext.js\";\nexport * from \"~/components/OptionsMenu/index.js\";\nexport * from \"~/components/Filters/index.js\";\nexport * from \"~/components/BulkActions/index.js\";\nexport { OverlayLayout, type OverlayLayoutProps } from \"~/components/OverlayLayout/index.js\";\nexport { type EmptyViewProps, EmptyView } from \"~/components/EmptyView.js\";\nexport {\n SimpleFormContent,\n SimpleForm,\n SimpleFormFooter,\n SimpleFormHeader\n} from \"~/components/SimpleForm/index.js\";\nexport {\n default as SingleImageUpload,\n type SingleImageUploadProps\n} from \"~/components/SingleImageUpload.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/LexicalEditor.js\";\nexport { Wcp } from \"~/components/Wcp.js\";\nexport * from \"~/components/IconPicker/index.js\";\nexport * from \"~/components/NavigationPrompt.js\";\nexport * from \"~/components/SplitView/index.js\";\nexport * from \"~/components/Permissions/index.js\";\nexport * from \"~/components/SearchUI.js\";\nexport * from \"~/components/RegisterFeature.js\";\nexport { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport * from \"~/components/RolesMultiAutocomplete/index.js\";\nexport * from \"~/components/RoleAutocomplete/index.js\";\nexport * from \"~/components/TeamAutocomplete/index.js\";\nexport * from \"~/components/TeamsMultiAutocomplete/index.js\";\n"],"mappings":"AAAA,SAASA,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,cAAc;AACvB,SAASC,gBAAgB;AACzB;AACA;AACA,SAASC,eAAe;AACxB;AACA;AACA;AACA,SAASC,aAAa;AACtB,SAA8BC,SAAS;AACvC,SACIC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB;AAEpB,SACIC,OAAO,IAAIC,iBAAiB;AAGhC,SAASC,aAAa;
|
|
1
|
+
{"version":3,"names":["FileManager","FloatingPanel","StateInspector","NavigationPrompt","DialogsProvider","OverlayLayout","EmptyView","SimpleFormContent","SimpleForm","SimpleFormFooter","SimpleFormHeader","default","SingleImageUpload","LexicalEditor","LexicalLinkForm","Wcp","RegisterFeature"],"sources":["index.ts"],"sourcesContent":["export { FileManager } from \"~/base/ui/FileManager.js\";\nexport { FloatingPanel } from \"~/components/FloatingPanel.js\";\nexport { StateInspector } from \"~/components/StateInspector.js\";\nexport { NavigationPrompt } from \"~/components/NavigationPrompt.js\";\nexport * from \"~/components/AdminLayout.js\";\nexport * from \"~/components/Buttons/index.js\";\nexport { DialogsProvider } from \"~/components/Dialogs/DialogsContext.js\";\nexport * from \"~/components/OptionsMenu/index.js\";\nexport * from \"~/components/Filters/index.js\";\nexport * from \"~/components/BulkActions/index.js\";\nexport { OverlayLayout, type OverlayLayoutProps } from \"~/components/OverlayLayout/index.js\";\nexport { type EmptyViewProps, EmptyView } from \"~/components/EmptyView.js\";\nexport {\n SimpleFormContent,\n SimpleForm,\n SimpleFormFooter,\n SimpleFormHeader\n} from \"~/components/SimpleForm/index.js\";\nexport {\n default as SingleImageUpload,\n type SingleImageUploadProps\n} from \"~/components/SingleImageUpload.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/index.js\";\nexport type { RichTextValueWithHtml } from \"~/components/LexicalEditor/index.js\";\nexport { LexicalLinkForm } from \"~/components/LexicalEditor/index.js\";\nexport { Wcp } from \"~/components/Wcp.js\";\nexport * from \"~/components/IconPicker/index.js\";\nexport * from \"~/components/NavigationPrompt.js\";\nexport * from \"~/components/SplitView/index.js\";\nexport * from \"~/components/Permissions/index.js\";\nexport * from \"~/components/SearchUI.js\";\nexport * from \"~/components/RegisterFeature.js\";\nexport { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport * from \"~/components/RolesMultiAutocomplete/index.js\";\nexport * from \"~/components/RoleAutocomplete/index.js\";\nexport * from \"~/components/TeamAutocomplete/index.js\";\nexport * from \"~/components/TeamsMultiAutocomplete/index.js\";\nexport * from \"./DeveloperMode/index.js\";\n"],"mappings":"AAAA,SAASA,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,cAAc;AACvB,SAASC,gBAAgB;AACzB;AACA;AACA,SAASC,eAAe;AACxB;AACA;AACA;AACA,SAASC,aAAa;AACtB,SAA8BC,SAAS;AACvC,SACIC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB;AAEpB,SACIC,OAAO,IAAIC,iBAAiB;AAGhC,SAASC,aAAa;AAEtB,SAASC,eAAe;AACxB,SAASC,GAAG;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,eAAe;AACxB;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SecurityPermissions","Security","Permissions"],"sources":["Security.ts"],"sourcesContent":["import { SecurityPermissions } from \"./SecurityPermissions.js\";\n\nexport const Security = {\n Permissions: SecurityPermissions\n};\n"],"mappings":"AAAA,SAASA,mBAAmB;AAE5B,OAAO,MAAMC,QAAQ,GAAG;EACpBC,WAAW,EAAEF;AACjB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PermissionSchema } from "../../permissions/types.js";
|
|
3
|
+
export type SecurityPermissionsProps = SecurityPermissionsPropsBase & ({
|
|
4
|
+
schema: PermissionSchema;
|
|
5
|
+
element?: never;
|
|
6
|
+
} | {
|
|
7
|
+
schema?: never;
|
|
8
|
+
element: React.ReactElement;
|
|
9
|
+
});
|
|
10
|
+
export interface SecurityPermissionsPropsBase {
|
|
11
|
+
name: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
icon?: React.ReactElement;
|
|
15
|
+
system?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const SecurityPermissions: ({ name, title, description, icon, schema, element, system }: SecurityPermissionsProps) => React.JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ConnectToProperties, Property, useIdGenerator } from "@webiny/react-properties";
|
|
3
|
+
export const SecurityPermissions = ({
|
|
4
|
+
name,
|
|
5
|
+
title,
|
|
6
|
+
description,
|
|
7
|
+
icon,
|
|
8
|
+
schema,
|
|
9
|
+
element,
|
|
10
|
+
system
|
|
11
|
+
}) => {
|
|
12
|
+
const getId = useIdGenerator("SecurityPermissions");
|
|
13
|
+
return /*#__PURE__*/React.createElement(ConnectToProperties, {
|
|
14
|
+
name: "AdminConfig"
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Property, {
|
|
16
|
+
id: getId(name),
|
|
17
|
+
name: "permissionRenderers",
|
|
18
|
+
array: true,
|
|
19
|
+
value: {
|
|
20
|
+
name,
|
|
21
|
+
title,
|
|
22
|
+
description,
|
|
23
|
+
icon,
|
|
24
|
+
schema,
|
|
25
|
+
element,
|
|
26
|
+
system
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=SecurityPermissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ConnectToProperties","Property","useIdGenerator","SecurityPermissions","name","title","description","icon","schema","element","system","getId","createElement","id","array","value"],"sources":["SecurityPermissions.tsx"],"sourcesContent":["import React from \"react\";\nimport { ConnectToProperties, Property, useIdGenerator } from \"@webiny/react-properties\";\nimport type { PermissionSchema } from \"~/permissions/types.js\";\n\nexport type SecurityPermissionsProps = SecurityPermissionsPropsBase &\n (\n | { schema: PermissionSchema; element?: never }\n | { schema?: never; element: React.ReactElement }\n );\n\nexport interface SecurityPermissionsPropsBase {\n name: string;\n title: string;\n description?: string;\n icon?: React.ReactElement;\n system?: boolean;\n}\n\nexport const SecurityPermissions = ({\n name,\n title,\n description,\n icon,\n schema,\n element,\n system\n}: SecurityPermissionsProps) => {\n const getId = useIdGenerator(\"SecurityPermissions\");\n\n return (\n <ConnectToProperties name={\"AdminConfig\"}>\n <Property\n id={getId(name)}\n name={\"permissionRenderers\"}\n array={true}\n value={{ name, title, description, icon, schema, element, system }}\n />\n </ConnectToProperties>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,0BAA0B;AAiBxF,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAChCC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,IAAI;EACJC,MAAM;EACNC,OAAO;EACPC;AACsB,CAAC,KAAK;EAC5B,MAAMC,KAAK,GAAGT,cAAc,CAAC,qBAAqB,CAAC;EAEnD,oBACIH,KAAA,CAAAa,aAAA,CAACZ,mBAAmB;IAACI,IAAI,EAAE;EAAc,gBACrCL,KAAA,CAAAa,aAAA,CAACX,QAAQ;IACLY,EAAE,EAAEF,KAAK,CAACP,IAAI,CAAE;IAChBA,IAAI,EAAE,qBAAsB;IAC5BU,KAAK,EAAE,IAAK;IACZC,KAAK,EAAE;MAAEX,IAAI;MAAEC,KAAK;MAAEC,WAAW;MAAEC,IAAI;MAAEC,MAAM;MAAEC,OAAO;MAAEC;IAAO;EAAE,CACtE,CACgB,CAAC;AAE9B,CAAC","ignoreList":[]}
|
package/config/AdminConfig.d.ts
CHANGED
|
@@ -3,11 +3,13 @@ import { type MenuConfig } from "./AdminConfig/Menu.js";
|
|
|
3
3
|
import type { SupportMenuConfig } from "./AdminConfig/Menu/SupportMenu.js";
|
|
4
4
|
import type { UserMenuConfig } from "./AdminConfig/Menu/UserMenu.js";
|
|
5
5
|
import { type WidgetConfig } from "./AdminConfig/Widget.js";
|
|
6
|
+
import type { PermissionRendererConfig } from "../permissions/types.js";
|
|
6
7
|
import type { EditorTheme } from "@webiny/lexical-theme";
|
|
7
8
|
export declare const AdminWithConfig: (({ onProperties, children }: import("./createAdminConfig.js").WithConfigProps) => React.JSX.Element) & {
|
|
8
9
|
displayName: string;
|
|
9
10
|
};
|
|
10
|
-
export declare const
|
|
11
|
+
export declare const AdminConfigPlugin: React.JSX.Element;
|
|
12
|
+
export declare const AdminConfigProvider: import("@webiny/app").Decorator<import("@webiny/app").GenericComponent<import("@webiny/app").ChildrenProps>>;
|
|
11
13
|
export declare const useAdminConfig: () => {
|
|
12
14
|
menus: MenuConfig[];
|
|
13
15
|
userMenus: UserMenuConfig[];
|
|
@@ -18,6 +20,7 @@ export declare const useAdminConfig: () => {
|
|
|
18
20
|
horizontalLogo: React.ReactNode;
|
|
19
21
|
};
|
|
20
22
|
widgets: WidgetConfig[];
|
|
23
|
+
permissionRenderers: PermissionRendererConfig[];
|
|
21
24
|
lexicalTheme: EditorTheme;
|
|
22
25
|
};
|
|
23
26
|
export interface PublicProps {
|
|
@@ -455,6 +458,9 @@ export declare const AdminConfig: (({ children }: PrivateProps) => React.JSX.Ele
|
|
|
455
458
|
Dashboard: {
|
|
456
459
|
Widget: ({ name, element, column, pin }: import("./AdminConfig/Widget.js").WidgetProps) => React.JSX.Element;
|
|
457
460
|
};
|
|
461
|
+
Security: {
|
|
462
|
+
Permissions: ({ name, title, description, icon, schema, element, system }: import("./AdminConfig/SecurityPermissions.js").SecurityPermissionsProps) => React.JSX.Element;
|
|
463
|
+
};
|
|
458
464
|
LexicalTheme: {
|
|
459
465
|
Color: ({ id, label, value, remove, replace, after, before }: import("./AdminConfig/LexicalTheme/Color.js").ColorProps) => React.JSX.Element;
|
|
460
466
|
Typography: {
|
|
@@ -474,6 +480,7 @@ export declare const AdminConfig: (({ children }: PrivateProps) => React.JSX.Ele
|
|
|
474
480
|
horizontalLogo: React.ReactNode;
|
|
475
481
|
};
|
|
476
482
|
widgets: WidgetConfig[];
|
|
483
|
+
permissionRenderers: PermissionRendererConfig[];
|
|
477
484
|
lexicalTheme: EditorTheme;
|
|
478
485
|
};
|
|
479
486
|
};
|
package/config/AdminConfig.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { createProvider } from "@webiny/app";
|
|
3
3
|
import { Menu } from "./AdminConfig/Menu.js";
|
|
4
4
|
import { Tenant } from "./AdminConfig/Tenant.js";
|
|
5
5
|
import { Route } from "./AdminConfig/Route.js";
|
|
6
6
|
import { Theme } from "./AdminConfig/Theme.js";
|
|
7
7
|
import { Dashboard } from "./AdminConfig/Dashboard.js";
|
|
8
|
+
import { Security } from "./AdminConfig/Security.js";
|
|
8
9
|
import { LexicalTheme } from "./AdminConfig/LexicalTheme.js";
|
|
9
10
|
import { Title } from "./AdminConfig/Title.js";
|
|
10
11
|
import { Logo } from "./AdminConfig/Logo.js";
|
|
@@ -14,11 +15,13 @@ const base = createAdminConfig();
|
|
|
14
15
|
export const AdminWithConfig = Object.assign(base.WithConfig, {
|
|
15
16
|
displayName: "AdminWithConfig"
|
|
16
17
|
});
|
|
17
|
-
|
|
18
|
+
/* Once the app fully renders (after the LoginScreen), apply protected configs. */
|
|
19
|
+
export const AdminConfigPlugin = /*#__PURE__*/React.createElement(base.ApplyProtectedConfig, null);
|
|
20
|
+
export const AdminConfigProvider = createProvider(Original => {
|
|
18
21
|
return function AdminConfigProvider({
|
|
19
22
|
children
|
|
20
23
|
}) {
|
|
21
|
-
return /*#__PURE__*/React.createElement(
|
|
24
|
+
return /*#__PURE__*/React.createElement(AdminWithConfig, null, /*#__PURE__*/React.createElement(base.ApplyPublicConfig, null), /*#__PURE__*/React.createElement(Original, null, children));
|
|
22
25
|
};
|
|
23
26
|
});
|
|
24
27
|
const lexicalTokens = createLexicalTokens("wa-lx-");
|
|
@@ -39,6 +42,7 @@ export const useAdminConfig = () => {
|
|
|
39
42
|
horizontalLogo: baseConfig.horizontalLogo
|
|
40
43
|
},
|
|
41
44
|
widgets: baseConfig.widgets ?? [],
|
|
45
|
+
permissionRenderers: baseConfig.permissionRenderers ?? [],
|
|
42
46
|
lexicalTheme
|
|
43
47
|
};
|
|
44
48
|
};
|
|
@@ -61,6 +65,7 @@ export const AdminConfig = Object.assign(Private, {
|
|
|
61
65
|
Title,
|
|
62
66
|
Logo,
|
|
63
67
|
Dashboard,
|
|
68
|
+
Security,
|
|
64
69
|
LexicalTheme,
|
|
65
70
|
useAdminConfig
|
|
66
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","createProvider","Menu","Tenant","Route","Theme","Dashboard","Security","LexicalTheme","Title","Logo","createAdminConfig","createLexicalTokens","base","AdminWithConfig","Object","assign","WithConfig","displayName","AdminConfigPlugin","createElement","ApplyProtectedConfig","AdminConfigProvider","Original","children","ApplyPublicConfig","lexicalTokens","useAdminConfig","baseConfig","useConfig","lexicalTheme","colors","typography","tokens","menus","userMenus","supportMenus","title","logo","squareLogo","horizontalLogo","widgets","permissionRenderers","Public","PublicConfig","Private","PrivateConfig","AdminConfig"],"sources":["AdminConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport { createProvider } from \"@webiny/app\";\nimport { Menu, type MenuConfig } from \"./AdminConfig/Menu.js\";\nimport type { TenantConfig } from \"./AdminConfig/Tenant.js\";\nimport { Tenant } from \"./AdminConfig/Tenant.js\";\nimport type { SupportMenuConfig } from \"./AdminConfig/Menu/SupportMenu.js\";\nimport type { UserMenuConfig } from \"./AdminConfig/Menu/UserMenu.js\";\nimport { Route } from \"./AdminConfig/Route.js\";\nimport { Theme } from \"./AdminConfig/Theme.js\";\nimport { Dashboard } from \"./AdminConfig/Dashboard.js\";\nimport { type WidgetConfig } from \"./AdminConfig/Widget.js\";\nimport { Security } from \"./AdminConfig/Security.js\";\nimport type { PermissionRendererConfig } from \"../permissions/types.js\";\nimport { LexicalTheme } from \"./AdminConfig/LexicalTheme.js\";\nimport { Title } from \"./AdminConfig/Title.js\";\nimport { Logo } from \"./AdminConfig/Logo.js\";\nimport { createAdminConfig } from \"./createAdminConfig.js\";\nimport type { EditorTheme } from \"@webiny/lexical-theme\";\nimport { createLexicalTokens } from \"@webiny/lexical-theme/createLexicalEditorTokens.js\";\n\nconst base = createAdminConfig<AdminConfig>();\n\nexport const AdminWithConfig = Object.assign(base.WithConfig, {\n displayName: \"AdminWithConfig\"\n});\n\ninterface AdminConfig {\n menus: MenuConfig[];\n supportMenus: SupportMenuConfig[];\n userMenus: UserMenuConfig[];\n tenant: TenantConfig;\n title: string;\n squareLogo: React.ReactNode;\n horizontalLogo: React.ReactNode;\n widgets: WidgetConfig[];\n permissionRenderers: PermissionRendererConfig[];\n lexicalTheme: EditorTheme;\n}\n\n/* Once the app fully renders (after the LoginScreen), apply protected configs. */\nexport const AdminConfigPlugin = <base.ApplyProtectedConfig />;\n\nexport const AdminConfigProvider = createProvider(Original => {\n return function AdminConfigProvider({ children }) {\n return (\n <AdminWithConfig>\n <base.ApplyPublicConfig />\n <Original>{children}</Original>\n </AdminWithConfig>\n );\n };\n});\n\nconst lexicalTokens = createLexicalTokens(\"wa-lx-\");\n\nexport const useAdminConfig = () => {\n const baseConfig = base.useConfig();\n\n const lexicalTheme: EditorTheme = {\n colors: baseConfig.lexicalTheme?.colors,\n typography: baseConfig.lexicalTheme?.typography || {},\n tokens: lexicalTokens\n };\n\n return {\n menus: baseConfig.menus ?? [],\n userMenus: baseConfig.userMenus ?? [],\n supportMenus: baseConfig.supportMenus ?? [],\n title: baseConfig.title,\n logo: {\n squareLogo: baseConfig.squareLogo,\n horizontalLogo: baseConfig.horizontalLogo\n },\n widgets: baseConfig.widgets ?? [],\n permissionRenderers: baseConfig.permissionRenderers ?? [],\n lexicalTheme\n };\n};\n\nexport interface PublicProps {\n children: React.ReactNode;\n}\n\nexport const Public = ({ children }: PublicProps) => {\n return <base.PublicConfig>{children}</base.PublicConfig>;\n};\n\nexport interface PrivateProps {\n children: React.ReactNode;\n}\n\nexport const Private = ({ children }: PrivateProps) => {\n return <base.PrivateConfig>{children}</base.PrivateConfig>;\n};\n\nexport const AdminConfig = Object.assign(Private, {\n Public,\n Theme,\n Menu,\n Route,\n Tenant,\n Title,\n Logo,\n Dashboard,\n Security,\n LexicalTheme,\n useAdminConfig\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,aAAa;AAC5C,SAASC,IAAI;AAEb,SAASC,MAAM;AAGf,SAASC,KAAK;AACd,SAASC,KAAK;AACd,SAASC,SAAS;AAElB,SAASC,QAAQ;AAEjB,SAASC,YAAY;AACrB,SAASC,KAAK;AACd,SAASC,IAAI;AACb,SAASC,iBAAiB;AAE1B,SAASC,mBAAmB,QAAQ,oDAAoD;AAExF,MAAMC,IAAI,GAAGF,iBAAiB,CAAc,CAAC;AAE7C,OAAO,MAAMG,eAAe,GAAGC,MAAM,CAACC,MAAM,CAACH,IAAI,CAACI,UAAU,EAAE;EAC1DC,WAAW,EAAE;AACjB,CAAC,CAAC;AAeF;AACA,OAAO,MAAMC,iBAAiB,gBAAGnB,KAAA,CAAAoB,aAAA,CAACP,IAAI,CAACQ,oBAAoB,MAAE,CAAC;AAE9D,OAAO,MAAMC,mBAAmB,GAAGrB,cAAc,CAACsB,QAAQ,IAAI;EAC1D,OAAO,SAASD,mBAAmBA,CAAC;IAAEE;EAAS,CAAC,EAAE;IAC9C,oBACIxB,KAAA,CAAAoB,aAAA,CAACN,eAAe,qBACZd,KAAA,CAAAoB,aAAA,CAACP,IAAI,CAACY,iBAAiB,MAAE,CAAC,eAC1BzB,KAAA,CAAAoB,aAAA,CAACG,QAAQ,QAAEC,QAAmB,CACjB,CAAC;EAE1B,CAAC;AACL,CAAC,CAAC;AAEF,MAAME,aAAa,GAAGd,mBAAmB,CAAC,QAAQ,CAAC;AAEnD,OAAO,MAAMe,cAAc,GAAGA,CAAA,KAAM;EAChC,MAAMC,UAAU,GAAGf,IAAI,CAACgB,SAAS,CAAC,CAAC;EAEnC,MAAMC,YAAyB,GAAG;IAC9BC,MAAM,EAAEH,UAAU,CAACE,YAAY,EAAEC,MAAM;IACvCC,UAAU,EAAEJ,UAAU,CAACE,YAAY,EAAEE,UAAU,IAAI,CAAC,CAAC;IACrDC,MAAM,EAAEP;EACZ,CAAC;EAED,OAAO;IACHQ,KAAK,EAAEN,UAAU,CAACM,KAAK,IAAI,EAAE;IAC7BC,SAAS,EAAEP,UAAU,CAACO,SAAS,IAAI,EAAE;IACrCC,YAAY,EAAER,UAAU,CAACQ,YAAY,IAAI,EAAE;IAC3CC,KAAK,EAAET,UAAU,CAACS,KAAK;IACvBC,IAAI,EAAE;MACFC,UAAU,EAAEX,UAAU,CAACW,UAAU;MACjCC,cAAc,EAAEZ,UAAU,CAACY;IAC/B,CAAC;IACDC,OAAO,EAAEb,UAAU,CAACa,OAAO,IAAI,EAAE;IACjCC,mBAAmB,EAAEd,UAAU,CAACc,mBAAmB,IAAI,EAAE;IACzDZ;EACJ,CAAC;AACL,CAAC;AAMD,OAAO,MAAMa,MAAM,GAAGA,CAAC;EAAEnB;AAAsB,CAAC,KAAK;EACjD,oBAAOxB,KAAA,CAAAoB,aAAA,CAACP,IAAI,CAAC+B,YAAY,QAAEpB,QAA4B,CAAC;AAC5D,CAAC;AAMD,OAAO,MAAMqB,OAAO,GAAGA,CAAC;EAAErB;AAAuB,CAAC,KAAK;EACnD,oBAAOxB,KAAA,CAAAoB,aAAA,CAACP,IAAI,CAACiC,aAAa,QAAEtB,QAA6B,CAAC;AAC9D,CAAC;AAED,OAAO,MAAMuB,WAAW,GAAGhC,MAAM,CAACC,MAAM,CAAC6B,OAAO,EAAE;EAC9CF,MAAM;EACNtC,KAAK;EACLH,IAAI;EACJE,KAAK;EACLD,MAAM;EACNM,KAAK;EACLC,IAAI;EACJJ,SAAS;EACTC,QAAQ;EACRC,YAAY;EACZmB;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/domain/Identity.js
CHANGED
package/domain/Identity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["makeAutoObservable","runInAction","minimatch","anonymousData","id","displayName","type","roles","teams","permissions","profile","external","currentTenant","name","defaultTenant","Identity","constructor","data","identityType","createAuthenticated","createAnonymous","isAuthenticated","getPermission","exact","perms","exactMatch","find","p","getPermissions","filter","current","update","updates"],"sources":["Identity.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport minimatch from \"minimatch\";\nimport type { Tenant } from \"~/features/tenancy/abstractions.js\";\n\nexport interface IPermission {\n name: string;\n [key: string]: any;\n}\n\nexport interface IRole {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface ITeam {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IProfile {\n external: boolean;\n email?: string;\n firstName?: string;\n lastName?: string;\n avatar?: {\n src?: string;\n };\n}\n\nexport interface IdentityData {\n id: string;\n type: string;\n displayName: string;\n roles: IRole[];\n teams: ITeam[];\n permissions: Identity.Permission[];\n profile: Identity.Profile;\n currentTenant: Tenant;\n defaultTenant: Tenant;\n}\n\nconst anonymousData: IdentityData = {\n id: \"anonymous\",\n displayName: \"Anonymous\",\n type: \"admin\",\n roles: [],\n teams: [],\n permissions: [],\n profile: {\n external: false\n },\n currentTenant: {\n id: \"root\",\n name: \"Root\"\n },\n defaultTenant: {\n id: \"root\",\n name: \"Root\"\n }\n};\n\nexport class Identity {\n private constructor(\n private data: Identity.Data,\n private identityType: \"anonymous\" | \"authenticated\"\n ) {\n makeAutoObservable(this);\n }\n\n static createAuthenticated(data: Identity.Data) {\n return new Identity(data, \"authenticated\");\n }\n\n static createAnonymous() {\n return new Identity(anonymousData, \"anonymous\");\n }\n\n get isAuthenticated(): boolean {\n return this.identityType === \"authenticated\";\n }\n\n get id() {\n return this.data.id;\n }\n\n get type() {\n return this.data.type;\n }\n\n get displayName() {\n return this.data.displayName;\n }\n\n get roles() {\n return this.data.roles ?? [];\n }\n\n get teams() {\n return this.data.teams ?? [];\n }\n\n get profile() {\n return this.data.profile;\n }\n\n get currentTenant() {\n return this.data.currentTenant;\n }\n\n get defaultTenant() {\n return this.data.defaultTenant;\n }\n\n getPermission<T extends Identity.Permission = Identity.Permission>(\n name: string,\n exact?: boolean\n ): T | null {\n const perms = (this.data.permissions || []) as T[];\n const exactMatch = perms.find(p => p.name === name);\n if (exactMatch) {\n return exactMatch as T;\n } else if (exact) {\n return null;\n }\n\n // Try matching using patterns\n return perms.find(p => minimatch(name, p.name)) || null;\n }\n\n getPermissions<T extends Identity.Permission = Identity.Permission>(name?: string): Array<T> {\n const permissions = this.data.permissions || [];\n if (!name) {\n return permissions as T[];\n }\n\n return permissions.filter(current => {\n const exactMatch = current.name === name;\n if (exactMatch) {\n return true;\n }\n\n // Try matching using patterns.\n return minimatch(name, current.name);\n }) as T[];\n }\n\n update(updates: Partial<Pick<Identity.Data, \"displayName\" | \"profile\">>) {\n runInAction(() => {\n this.data.displayName = updates.displayName || this.data.displayName;\n this.data.profile = updates.profile || this.data.profile;\n });\n }\n}\n\nexport namespace Identity {\n export type Data = IdentityData;\n export type Permission = IPermission;\n export type Profile = IProfile;\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AACtD,
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","minimatch","anonymousData","id","displayName","type","roles","teams","permissions","profile","external","currentTenant","name","defaultTenant","Identity","constructor","data","identityType","createAuthenticated","createAnonymous","isAuthenticated","getPermission","exact","perms","exactMatch","find","p","getPermissions","filter","current","update","updates"],"sources":["Identity.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport { minimatch } from \"minimatch\";\nimport type { Tenant } from \"~/features/tenancy/abstractions.js\";\n\nexport interface IPermission {\n name: string;\n [key: string]: any;\n}\n\nexport interface IRole {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface ITeam {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IProfile {\n external: boolean;\n email?: string;\n firstName?: string;\n lastName?: string;\n avatar?: {\n src?: string;\n };\n}\n\nexport interface IdentityData {\n id: string;\n type: string;\n displayName: string;\n roles: IRole[];\n teams: ITeam[];\n permissions: Identity.Permission[];\n profile: Identity.Profile;\n currentTenant: Tenant;\n defaultTenant: Tenant;\n}\n\nconst anonymousData: IdentityData = {\n id: \"anonymous\",\n displayName: \"Anonymous\",\n type: \"admin\",\n roles: [],\n teams: [],\n permissions: [],\n profile: {\n external: false\n },\n currentTenant: {\n id: \"root\",\n name: \"Root\"\n },\n defaultTenant: {\n id: \"root\",\n name: \"Root\"\n }\n};\n\nexport class Identity {\n private constructor(\n private data: Identity.Data,\n private identityType: \"anonymous\" | \"authenticated\"\n ) {\n makeAutoObservable(this);\n }\n\n static createAuthenticated(data: Identity.Data) {\n return new Identity(data, \"authenticated\");\n }\n\n static createAnonymous() {\n return new Identity(anonymousData, \"anonymous\");\n }\n\n get isAuthenticated(): boolean {\n return this.identityType === \"authenticated\";\n }\n\n get id() {\n return this.data.id;\n }\n\n get type() {\n return this.data.type;\n }\n\n get displayName() {\n return this.data.displayName;\n }\n\n get roles() {\n return this.data.roles ?? [];\n }\n\n get teams() {\n return this.data.teams ?? [];\n }\n\n get profile() {\n return this.data.profile;\n }\n\n get currentTenant() {\n return this.data.currentTenant;\n }\n\n get defaultTenant() {\n return this.data.defaultTenant;\n }\n\n getPermission<T extends Identity.Permission = Identity.Permission>(\n name: string,\n exact?: boolean\n ): T | null {\n const perms = (this.data.permissions || []) as T[];\n const exactMatch = perms.find(p => p.name === name);\n if (exactMatch) {\n return exactMatch as T;\n } else if (exact) {\n return null;\n }\n\n // Try matching using patterns\n return perms.find(p => minimatch(name, p.name)) || null;\n }\n\n getPermissions<T extends Identity.Permission = Identity.Permission>(name?: string): Array<T> {\n const permissions = this.data.permissions || [];\n if (!name) {\n return permissions as T[];\n }\n\n return permissions.filter(current => {\n const exactMatch = current.name === name;\n if (exactMatch) {\n return true;\n }\n\n // Try matching using patterns.\n return minimatch(name, current.name);\n }) as T[];\n }\n\n update(updates: Partial<Pick<Identity.Data, \"displayName\" | \"profile\">>) {\n runInAction(() => {\n this.data.displayName = updates.displayName || this.data.displayName;\n this.data.profile = updates.profile || this.data.profile;\n });\n }\n}\n\nexport namespace Identity {\n export type Data = IdentityData;\n export type Permission = IPermission;\n export type Profile = IProfile;\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BuildParam","BuildParams"],"sources":["build-params.ts"],"sourcesContent":["export { BuildParam, BuildParams } from \"~/features/buildParams/index.js\";\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { Bind } from "@webiny/form";
|
|
2
|
+
export { Form } from "@webiny/form";
|
|
3
|
+
export { UnsetOnUnmount } from "@webiny/form";
|
|
4
|
+
export { useBind } from "@webiny/form";
|
|
5
|
+
export { useBindPrefix } from "@webiny/form";
|
|
6
|
+
export { useGenerateSlug } from "@webiny/form";
|
|
7
|
+
export { useForm } from "@webiny/form";
|
|
8
|
+
export type { FormAPI as FormApi, FormOnSubmit, GenericFormData } from "@webiny/form";
|
|
9
|
+
export { validation } from "@webiny/validation";
|
|
10
|
+
export { Validation } from "@webiny/validation";
|
|
11
|
+
export { ValidationError } from "@webiny/validation";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Bind } from "@webiny/form";
|
|
2
|
+
export { Form } from "@webiny/form";
|
|
3
|
+
export { UnsetOnUnmount } from "@webiny/form";
|
|
4
|
+
export { useBind } from "@webiny/form";
|
|
5
|
+
export { useBindPrefix } from "@webiny/form";
|
|
6
|
+
export { useGenerateSlug } from "@webiny/form";
|
|
7
|
+
export { useForm } from "@webiny/form";
|
|
8
|
+
export { validation } from "@webiny/validation";
|
|
9
|
+
export { Validation } from "@webiny/validation";
|
|
10
|
+
export { ValidationError } from "@webiny/validation";
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Bind","Form","UnsetOnUnmount","useBind","useBindPrefix","useGenerateSlug","useForm","validation","Validation","ValidationError"],"sources":["form.ts"],"sourcesContent":["export { Bind } from \"@webiny/form\";\nexport { Form } from \"@webiny/form\";\nexport { UnsetOnUnmount } from \"@webiny/form\";\nexport { useBind } from \"@webiny/form\";\nexport { useBindPrefix } from \"@webiny/form\";\nexport { useGenerateSlug } from \"@webiny/form\";\nexport { useForm } from \"@webiny/form\";\nexport type { FormAPI as FormApi, FormOnSubmit, GenericFormData } from \"@webiny/form\";\nexport { validation } from \"@webiny/validation\";\nexport { Validation } from \"@webiny/validation\";\nexport { ValidationError } from \"@webiny/validation\";\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,cAAc,QAAQ,cAAc;AAC7C,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,aAAa,QAAQ,cAAc;AAC5C,SAASC,eAAe,QAAQ,cAAc;AAC9C,SAASC,OAAO,QAAQ,cAAc;AAEtC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,eAAe,QAAQ,oBAAoB","ignoreList":[]}
|
package/exports/admin/ui.d.ts
CHANGED
package/exports/admin/ui.js
CHANGED
package/exports/admin/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Logo","TenantSelector","LexicalEditor"],"sources":["ui.ts"],"sourcesContent":["export { Logo } from \"~/base/ui/Logo.js\";\nexport { TenantSelector } from \"~/base/ui/TenantSelector.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/LexicalEditor.js\";\n"],"mappings":"AAAA,SAASA,IAAI;AACb,SAASC,cAAc;AACvB,SAASC,aAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useDialogs","Logo","TenantSelector","LexicalEditor"],"sources":["ui.ts"],"sourcesContent":["export { useDialogs } from \"~/components/Dialogs/useDialogs.js\";\nexport { Logo } from \"~/base/ui/Logo.js\";\nexport { TenantSelector } from \"~/base/ui/TenantSelector.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/LexicalEditor.js\";\n"],"mappings":"AAAA,SAASA,UAAU;AACnB,SAASC,IAAI;AACb,SAASC,cAAc;AACvB,SAASC,aAAa","ignoreList":[]}
|
package/exports/admin.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export { createPermissionSchema } from "../permissions/index.js";
|
|
2
|
+
export { createHasPermission } from "../permissions/index.js";
|
|
3
|
+
export { createUsePermissions } from "../permissions/index.js";
|
|
1
4
|
export { RegisterFeature } from "../components/RegisterFeature.js";
|
|
2
5
|
export { BuildParam, BuildParams } from "../features/buildParams/index.js";
|
|
3
6
|
export { AdminConfig } from "../config/AdminConfig.js";
|
|
7
|
+
export { Routes } from "../routes.js";
|
package/exports/admin.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
export { createPermissionSchema } from "../permissions/index.js";
|
|
2
|
+
export { createHasPermission } from "../permissions/index.js";
|
|
3
|
+
export { createUsePermissions } from "../permissions/index.js";
|
|
1
4
|
export { RegisterFeature } from "../components/RegisterFeature.js";
|
|
2
5
|
export { BuildParam, BuildParams } from "../features/buildParams/index.js";
|
|
3
6
|
export { AdminConfig } from "../config/AdminConfig.js";
|
|
7
|
+
export { Routes } from "../routes.js";
|
|
4
8
|
|
|
5
9
|
//# sourceMappingURL=admin.js.map
|
package/exports/admin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["RegisterFeature","BuildParam","BuildParams","AdminConfig"],"sources":["admin.ts"],"sourcesContent":["export { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport { BuildParam, BuildParams } from \"~/features/buildParams/index.js\";\nexport { AdminConfig } from \"~/config/AdminConfig.js\";\n"],"mappings":"AAAA,SAASA,eAAe;AACxB,SAASC,UAAU,EAAEC,WAAW;AAChC,SAASC,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["createPermissionSchema","createHasPermission","createUsePermissions","RegisterFeature","BuildParam","BuildParams","AdminConfig","Routes"],"sources":["admin.ts"],"sourcesContent":["export { createPermissionSchema } from \"~/permissions/index.js\";\nexport { createHasPermission } from \"~/permissions/index.js\";\nexport { createUsePermissions } from \"~/permissions/index.js\";\nexport { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport { BuildParam, BuildParams } from \"~/features/buildParams/index.js\";\nexport { AdminConfig } from \"~/config/AdminConfig.js\";\nexport { Routes } from \"~/routes.js\";\n"],"mappings":"AAAA,SAASA,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,oBAAoB;AAC7B,SAASC,eAAe;AACxB,SAASC,UAAU,EAAEC,WAAW;AAChC,SAASC,WAAW;AACpB,SAASC,MAAM","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ export declare class ReactLicense implements ILicense {
|
|
|
9
9
|
canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean;
|
|
10
10
|
canUseFileManagerThreatDetection(): boolean;
|
|
11
11
|
canUseFolderLevelPermissions(): boolean;
|
|
12
|
+
canUseHcmsFieldPermissions(): boolean;
|
|
12
13
|
canUsePrivateFiles(): boolean;
|
|
13
14
|
canUseRecordLocking(): boolean;
|
|
14
15
|
canUseTeams(): boolean;
|
|
@@ -20,6 +20,9 @@ export class ReactLicense {
|
|
|
20
20
|
canUseFolderLevelPermissions() {
|
|
21
21
|
return this.license.canUseFolderLevelPermissions();
|
|
22
22
|
}
|
|
23
|
+
canUseHcmsFieldPermissions() {
|
|
24
|
+
return this.license.canUseHcmsFieldPermissions();
|
|
25
|
+
}
|
|
23
26
|
canUsePrivateFiles() {
|
|
24
27
|
return this.license.canUsePrivateFiles();
|
|
25
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ReactLicense","constructor","license","getProject","canUseAacl","canUseAuditLogs","canUseFeature","featureId","canUseFileManagerThreatDetection","canUseFolderLevelPermissions","canUsePrivateFiles","canUseRecordLocking","canUseTeams","getRawLicense","canUseWorkflows","toDto"],"sources":["ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n toDto(): DecryptedWcpProjectLicense | null {\n return this.license.toDto();\n }\n}\n"],"mappings":"AAGA,OAAO,MAAMA,YAAY,CAAqB;EAG1CC,WAAWA,CAACC,OAAiB,EAAE;IAC3B,IAAI,CAACA,OAAO,GAAGA,OAAO;EAC1B;EAEAC,UAAUA,CAAA,EAAsB;IAC5B,OAAO,IAAI,CAACD,OAAO,CAACC,UAAU,CAAC,CAAC;EACpC;EAEAC,UAAUA,CAAA,EAAY;IAClB,OAAO,IAAI,CAACF,OAAO,CAACE,UAAU,CAAC,CAAC;EACpC;EAEAC,eAAeA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACH,OAAO,CAACG,eAAe,CAAC,CAAC;EACzC;EAEAC,aAAaA,CAACC,SAAyC,EAAW;IAC9D,OAAO,IAAI,CAACL,OAAO,CAACI,aAAa,CAACC,SAAS,CAAC;EAChD;EAEAC,gCAAgCA,CAAA,EAAY;IACxC,OAAO,IAAI,CAACN,OAAO,CAACM,gCAAgC,CAAC,CAAC;EAC1D;EAEAC,4BAA4BA,CAAA,EAAY;IACpC,OAAO,IAAI,CAACP,OAAO,CAACO,4BAA4B,CAAC,CAAC;EACtD;EAEAC,
|
|
1
|
+
{"version":3,"names":["ReactLicense","constructor","license","getProject","canUseAacl","canUseAuditLogs","canUseFeature","featureId","canUseFileManagerThreatDetection","canUseFolderLevelPermissions","canUseHcmsFieldPermissions","canUsePrivateFiles","canUseRecordLocking","canUseTeams","getRawLicense","canUseWorkflows","toDto"],"sources":["ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUseHcmsFieldPermissions(): boolean {\n return this.license.canUseHcmsFieldPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n toDto(): DecryptedWcpProjectLicense | null {\n return this.license.toDto();\n }\n}\n"],"mappings":"AAGA,OAAO,MAAMA,YAAY,CAAqB;EAG1CC,WAAWA,CAACC,OAAiB,EAAE;IAC3B,IAAI,CAACA,OAAO,GAAGA,OAAO;EAC1B;EAEAC,UAAUA,CAAA,EAAsB;IAC5B,OAAO,IAAI,CAACD,OAAO,CAACC,UAAU,CAAC,CAAC;EACpC;EAEAC,UAAUA,CAAA,EAAY;IAClB,OAAO,IAAI,CAACF,OAAO,CAACE,UAAU,CAAC,CAAC;EACpC;EAEAC,eAAeA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACH,OAAO,CAACG,eAAe,CAAC,CAAC;EACzC;EAEAC,aAAaA,CAACC,SAAyC,EAAW;IAC9D,OAAO,IAAI,CAACL,OAAO,CAACI,aAAa,CAACC,SAAS,CAAC;EAChD;EAEAC,gCAAgCA,CAAA,EAAY;IACxC,OAAO,IAAI,CAACN,OAAO,CAACM,gCAAgC,CAAC,CAAC;EAC1D;EAEAC,4BAA4BA,CAAA,EAAY;IACpC,OAAO,IAAI,CAACP,OAAO,CAACO,4BAA4B,CAAC,CAAC;EACtD;EAEAC,0BAA0BA,CAAA,EAAY;IAClC,OAAO,IAAI,CAACR,OAAO,CAACQ,0BAA0B,CAAC,CAAC;EACpD;EAEAC,kBAAkBA,CAAA,EAAY;IAC1B,OAAO,IAAI,CAACT,OAAO,CAACS,kBAAkB,CAAC,CAAC;EAC5C;EAEAC,mBAAmBA,CAAA,EAAY;IAC3B,OAAO,IAAI,CAACV,OAAO,CAACU,mBAAmB,CAAC,CAAC;EAC7C;EAEAC,WAAWA,CAAA,EAAY;IACnB,OAAO,IAAI,CAACX,OAAO,CAACW,WAAW,CAAC,CAAC;EACrC;EAEAC,aAAaA,CAAA,EAAsC;IAC/C,OAAO,IAAI,CAACZ,OAAO,CAACY,aAAa,CAAC,CAAC;EACvC;EAEOC,eAAeA,CAAA,EAAY;IAC9B,OAAO,IAAI,CAACb,OAAO,CAACa,eAAe,CAAC,CAAC;EACzC;EAEAC,KAAKA,CAAA,EAAsC;IACvC,OAAO,IAAI,CAACd,OAAO,CAACc,KAAK,CAAC,CAAC;EAC/B;AACJ","ignoreList":[]}
|
package/index.d.ts
CHANGED
|
@@ -16,8 +16,9 @@ export { Admin } from "./base/Admin.js";
|
|
|
16
16
|
export * from "./config/AdminConfig.js";
|
|
17
17
|
export type { AdminProps } from "./base/Admin.js";
|
|
18
18
|
export * from "./base/plugins/AddGraphQLQuerySelection.js";
|
|
19
|
-
export * from "./
|
|
19
|
+
export * from "./permissions/index.js";
|
|
20
20
|
export * from "./components/index.js";
|
|
21
|
+
export type { RichTextValueWithHtml } from "./components/index.js";
|
|
21
22
|
export { HasPermission } from "./presentation/security/components/HasPermission.js";
|
|
22
23
|
export { SecureRoute } from "./presentation/security/components/SecureRoute.js";
|
|
23
24
|
export { FileManager, FileManagerRenderer } from "./base/ui/FileManager.js";
|
package/index.js
CHANGED
|
@@ -17,7 +17,9 @@ export { Admin } from "./base/Admin.js";
|
|
|
17
17
|
export * from "./config/AdminConfig.js";
|
|
18
18
|
// Plugins
|
|
19
19
|
export * from "./base/plugins/AddGraphQLQuerySelection.js";
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
// Permissions
|
|
22
|
+
export * from "./permissions/index.js";
|
|
21
23
|
|
|
22
24
|
// Components
|
|
23
25
|
export * from "./components/index.js";
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Admin","HasPermission","SecureRoute","FileManager","FileManagerRenderer","SystemInstallerProvider","BuildParamsFeature","useWcp","useTenantContext","useIdentity","useAuthentication","useSecurity"],"sources":["index.ts"],"sourcesContent":["export * from \"@webiny/app\";\nexport type { HigherOrderComponent, ProviderProps, ComposeProps } from \"@webiny/app\";\n// UI components\nexport * from \"./base/ui/Tags.js\";\nexport * from \"./base/ui/Layout.js\";\nexport * from \"./base/ui/TenantSelector.js\";\nexport type { LayoutProps } from \"./base/ui/Layout.js\";\nexport * from \"./base/ui/Navigation.js\";\nexport * from \"./base/ui/Brand.js\";\nexport * from \"./base/ui/Logo.js\";\nexport * from \"./base/ui/UserMenu.js\";\nexport * from \"./base/ui/LoginScreen.js\";\nexport * from \"./base/ui/CenteredView.js\";\nexport * from \"./base/ui/Dashboard.js\";\nexport * from \"./base/ui/NotFound.js\";\n\n// Base admin app\nexport { Admin } from \"./base/Admin.js\";\nexport * from \"./config/AdminConfig.js\";\n\nexport type { AdminProps } from \"./base/Admin.js\";\n\n// Plugins\nexport * from \"./base/plugins/AddGraphQLQuerySelection.js\";\nexport * from \"./
|
|
1
|
+
{"version":3,"names":["Admin","HasPermission","SecureRoute","FileManager","FileManagerRenderer","SystemInstallerProvider","BuildParamsFeature","useWcp","useTenantContext","useIdentity","useAuthentication","useSecurity"],"sources":["index.ts"],"sourcesContent":["export * from \"@webiny/app\";\nexport type { HigherOrderComponent, ProviderProps, ComposeProps } from \"@webiny/app\";\n// UI components\nexport * from \"./base/ui/Tags.js\";\nexport * from \"./base/ui/Layout.js\";\nexport * from \"./base/ui/TenantSelector.js\";\nexport type { LayoutProps } from \"./base/ui/Layout.js\";\nexport * from \"./base/ui/Navigation.js\";\nexport * from \"./base/ui/Brand.js\";\nexport * from \"./base/ui/Logo.js\";\nexport * from \"./base/ui/UserMenu.js\";\nexport * from \"./base/ui/LoginScreen.js\";\nexport * from \"./base/ui/CenteredView.js\";\nexport * from \"./base/ui/Dashboard.js\";\nexport * from \"./base/ui/NotFound.js\";\n\n// Base admin app\nexport { Admin } from \"./base/Admin.js\";\nexport * from \"./config/AdminConfig.js\";\n\nexport type { AdminProps } from \"./base/Admin.js\";\n\n// Plugins\nexport * from \"./base/plugins/AddGraphQLQuerySelection.js\";\n\n// Permissions\nexport * from \"./permissions/index.js\";\n\n// Components\nexport * from \"./components/index.js\";\nexport type { RichTextValueWithHtml } from \"./components/index.js\";\nexport { HasPermission } from \"./presentation/security/components/HasPermission.js\";\nexport { SecureRoute } from \"./presentation/security/components/SecureRoute.js\";\n\nexport { FileManager, FileManagerRenderer } from \"./base/ui/FileManager.js\";\nexport type {\n FileManagerProps,\n FileManagerRendererProps,\n FileManagerFileItem,\n FileManagerOnChange\n} from \"./base/ui/FileManager.js\";\n\nexport { SystemInstallerProvider } from \"./presentation/installation/components/SystemInstaller/index.js\";\n\n// Feature types\nexport type { AaclPermission } from \"./features/wcp/types.js\";\nexport type { Tenant } from \"./features/tenancy/types.js\";\n\n// Features\nexport { BuildParamsFeature } from \"./features/buildParams/feature.js\";\n\n// Hooks\nexport * from \"./hooks/index.js\";\nexport { useWcp } from \"./presentation/wcp/useWcp.js\";\nexport { useTenantContext } from \"./presentation/tenancy/useTenantContext.js\";\nexport { useIdentity } from \"./presentation/security/hooks/useIdentity.js\";\nexport { useAuthentication } from \"./presentation/security/hooks/useAuthentication.js\";\n// Legacy hook for easier migration\nexport { useSecurity } from \"./presentation/security/hooks/useSecurity.js\";\n\nexport * from \"@webiny/app/renderApp.js\";\n"],"mappings":"AAAA,cAAc,aAAa;AAE3B;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,KAAK;AACd;AAIA;AACA;;AAEA;AACA;;AAEA;AACA;AAEA,SAASC,aAAa;AACtB,SAASC,WAAW;AAEpB,SAASC,WAAW,EAAEC,mBAAmB;AAQzC,SAASC,uBAAuB;;AAEhC;;AAIA;AACA,SAASC,kBAAkB;;AAE3B;AACA;AACA,SAASC,MAAM;AACf,SAASC,gBAAgB;AACzB,SAASC,WAAW;AACpB,SAASC,iBAAiB;AAC1B;AACA,SAASC,WAAW;AAEpB,cAAc,0BAA0B","ignoreList":[]}
|