@webiny/app-file-manager 5.39.7-beta.1 → 5.39.7-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,7 +45,7 @@ var FileAliasMessage = /*#__PURE__*/(0, _styled.default)("span", {
|
|
|
45
45
|
label: "FileAliasMessage",
|
|
46
46
|
target: "e1f610363"
|
|
47
47
|
})("color:var(--mdc-theme-text-secondary-on-background);font-size:12px;");
|
|
48
|
-
var PATHNAME_REGEX = /^\/[/.a-zA-Z0-9-]+$/;
|
|
48
|
+
var PATHNAME_REGEX = /^\/[/.a-zA-Z0-9-_]+$/;
|
|
49
49
|
var Aliases = function Aliases() {
|
|
50
50
|
var _useBind = (0, _form.useBind)({
|
|
51
51
|
name: "aliases"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_styled","_interopRequireDefault","_delete","_DynamicFieldset","_Input","_Typography","_Button","_validation","_form","Fieldset","styled","target","label","position","width","marginBottom","display","right","top","Header","justifyContent","DeleteAliasButton","IconButton","FileAliasMessage","PATHNAME_REGEX","Aliases","_useBind","useBind","name","value","onChange","addAlias","newValue","Array","isArray","_toConsumableArray2","default","push","aliasValidator","useMemo","validation","create","test","Error","createElement","DynamicFieldset","_ref","actions","header","row","empty","Fragment","_ref2","index","Bind","validators","concat","Input","placeholder","description","icon","ReactComponent","onClick","remove","Typography","use","ButtonDefault","exports"],"sources":["Aliases.tsx"],"sourcesContent":["import React, { Fragment, useMemo } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { ReactComponent as DeleteIcon } from \"@material-design-icons/svg/outlined/delete.svg\";\nimport { DynamicFieldset } from \"@webiny/ui/DynamicFieldset\";\nimport { Input } from \"@webiny/ui/Input\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { ButtonDefault, IconButton } from \"@webiny/ui/Button\";\nimport { validation } from \"@webiny/validation\";\nimport { Bind, useBind } from \"@webiny/form\";\n\nconst Fieldset = styled(\"div\")({\n position: \"relative\",\n width: \"100%\",\n marginBottom: 15,\n \".webiny-ui-button\": {\n position: \"absolute\",\n display: \"block\",\n right: 10,\n top: 13\n }\n});\n\nconst Header = styled(\"div\")({\n display: \"flex\",\n justifyContent: \"space-between\"\n});\n\nconst DeleteAliasButton = styled(IconButton)`\n position: absolute;\n top: 5px;\n right: 5px;\n`;\n\nconst FileAliasMessage = styled(\"span\")`\n color: var(--mdc-theme-text-secondary-on-background);\n font-size: 12px;\n`;\n\nconst PATHNAME_REGEX = /^\\/[/.a-zA-Z0-9-]+$/;\n\nexport const Aliases = () => {\n const { value, onChange } = useBind<string[]>({ name: \"aliases\" });\n\n const addAlias = () => {\n const newValue = Array.isArray(value) ? [...value] : [];\n newValue.push(\"\");\n if (!onChange) {\n return;\n }\n onChange(newValue);\n };\n\n const aliasValidator = useMemo(() => {\n return [\n validation.create(\"required\"),\n (value: string) => {\n if (!PATHNAME_REGEX.test(value)) {\n throw new Error(\"Value must be a valid pathname.\");\n }\n }\n ];\n }, []);\n\n return (\n <DynamicFieldset value={value || [\"\"]} onChange={onChange}>\n {({ actions, header, row, empty }) => (\n <>\n {row(({ index }) => (\n <Fieldset>\n <Bind validators={aliasValidator} name={`aliases.${index}`}>\n <Input\n placeholder={\"Alias\"}\n description={\n \"Enter a file path, e.g., /my/custom/file/path.png\"\n }\n />\n </Bind>\n <DeleteAliasButton\n icon={<DeleteIcon />}\n onClick={actions.remove(index)}\n />\n </Fieldset>\n ))}\n {empty(() => (\n <Fragment>\n <Header>\n <Typography use={\"overline\"}>File Aliases</Typography>\n <ButtonDefault onClick={addAlias}>+ Add Alias</ButtonDefault>\n </Header>\n <Typography use={\"caption\"}>\n <FileAliasMessage>\n To make your file accessible via custom paths, add one or more\n aliases.\n </FileAliasMessage>\n </Typography>\n </Fragment>\n ))}\n {header(() => (\n <Header>\n <Typography use={\"overline\"}>File Aliases</Typography>\n <ButtonDefault onClick={addAlias}>+ Add Alias</ButtonDefault>\n </Header>\n ))}\n </>\n )}\n </DynamicFieldset>\n );\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AAEA,IAAMU,QAAQ,oBAAGC,eAAM,EAAC,KAAK;EAAAC,MAAA;EAAAC,KAAA;AAAA,GAAE;EAC3BC,QAAQ,EAAE,UAAU;EACpBC,KAAK,EAAE,MAAM;EACbC,YAAY,EAAE,EAAE;EAChB,mBAAmB,EAAE;IACjBF,QAAQ,EAAE,UAAU;IACpBG,OAAO,EAAE,OAAO;IAChBC,KAAK,EAAE,EAAE;IACTC,GAAG,EAAE;EACT;AACJ,CAAC,CAAC;AAEF,IAAMC,MAAM,oBAAGT,eAAM,EAAC,KAAK;EAAAC,MAAA;EAAAC,KAAA;AAAA,GAAE;EACzBI,OAAO,EAAE,MAAM;EACfI,cAAc,EAAE;AACpB,CAAC,CAAC;AAEF,IAAMC,iBAAiB,oBAAGX,eAAM,EAACY,kBAAU;EAAAV,KAAA;EAAAD,MAAA;AAAA,0CAI1C;AAED,IAAMY,gBAAgB,oBAAGb,eAAM,EAAC,MAAM;EAAAE,KAAA;EAAAD,MAAA;AAAA,yEAGrC;AAED,IAAMa,cAAc,GAAG,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_styled","_interopRequireDefault","_delete","_DynamicFieldset","_Input","_Typography","_Button","_validation","_form","Fieldset","styled","target","label","position","width","marginBottom","display","right","top","Header","justifyContent","DeleteAliasButton","IconButton","FileAliasMessage","PATHNAME_REGEX","Aliases","_useBind","useBind","name","value","onChange","addAlias","newValue","Array","isArray","_toConsumableArray2","default","push","aliasValidator","useMemo","validation","create","test","Error","createElement","DynamicFieldset","_ref","actions","header","row","empty","Fragment","_ref2","index","Bind","validators","concat","Input","placeholder","description","icon","ReactComponent","onClick","remove","Typography","use","ButtonDefault","exports"],"sources":["Aliases.tsx"],"sourcesContent":["import React, { Fragment, useMemo } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { ReactComponent as DeleteIcon } from \"@material-design-icons/svg/outlined/delete.svg\";\nimport { DynamicFieldset } from \"@webiny/ui/DynamicFieldset\";\nimport { Input } from \"@webiny/ui/Input\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { ButtonDefault, IconButton } from \"@webiny/ui/Button\";\nimport { validation } from \"@webiny/validation\";\nimport { Bind, useBind } from \"@webiny/form\";\n\nconst Fieldset = styled(\"div\")({\n position: \"relative\",\n width: \"100%\",\n marginBottom: 15,\n \".webiny-ui-button\": {\n position: \"absolute\",\n display: \"block\",\n right: 10,\n top: 13\n }\n});\n\nconst Header = styled(\"div\")({\n display: \"flex\",\n justifyContent: \"space-between\"\n});\n\nconst DeleteAliasButton = styled(IconButton)`\n position: absolute;\n top: 5px;\n right: 5px;\n`;\n\nconst FileAliasMessage = styled(\"span\")`\n color: var(--mdc-theme-text-secondary-on-background);\n font-size: 12px;\n`;\n\nconst PATHNAME_REGEX = /^\\/[/.a-zA-Z0-9-_]+$/;\n\nexport const Aliases = () => {\n const { value, onChange } = useBind<string[]>({ name: \"aliases\" });\n\n const addAlias = () => {\n const newValue = Array.isArray(value) ? [...value] : [];\n newValue.push(\"\");\n if (!onChange) {\n return;\n }\n onChange(newValue);\n };\n\n const aliasValidator = useMemo(() => {\n return [\n validation.create(\"required\"),\n (value: string) => {\n if (!PATHNAME_REGEX.test(value)) {\n throw new Error(\"Value must be a valid pathname.\");\n }\n }\n ];\n }, []);\n\n return (\n <DynamicFieldset value={value || [\"\"]} onChange={onChange}>\n {({ actions, header, row, empty }) => (\n <>\n {row(({ index }) => (\n <Fieldset>\n <Bind validators={aliasValidator} name={`aliases.${index}`}>\n <Input\n placeholder={\"Alias\"}\n description={\n \"Enter a file path, e.g., /my/custom/file/path.png\"\n }\n />\n </Bind>\n <DeleteAliasButton\n icon={<DeleteIcon />}\n onClick={actions.remove(index)}\n />\n </Fieldset>\n ))}\n {empty(() => (\n <Fragment>\n <Header>\n <Typography use={\"overline\"}>File Aliases</Typography>\n <ButtonDefault onClick={addAlias}>+ Add Alias</ButtonDefault>\n </Header>\n <Typography use={\"caption\"}>\n <FileAliasMessage>\n To make your file accessible via custom paths, add one or more\n aliases.\n </FileAliasMessage>\n </Typography>\n </Fragment>\n ))}\n {header(() => (\n <Header>\n <Typography use={\"overline\"}>File Aliases</Typography>\n <ButtonDefault onClick={addAlias}>+ Add Alias</ButtonDefault>\n </Header>\n ))}\n </>\n )}\n </DynamicFieldset>\n );\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AAEA,IAAMU,QAAQ,oBAAGC,eAAM,EAAC,KAAK;EAAAC,MAAA;EAAAC,KAAA;AAAA,GAAE;EAC3BC,QAAQ,EAAE,UAAU;EACpBC,KAAK,EAAE,MAAM;EACbC,YAAY,EAAE,EAAE;EAChB,mBAAmB,EAAE;IACjBF,QAAQ,EAAE,UAAU;IACpBG,OAAO,EAAE,OAAO;IAChBC,KAAK,EAAE,EAAE;IACTC,GAAG,EAAE;EACT;AACJ,CAAC,CAAC;AAEF,IAAMC,MAAM,oBAAGT,eA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C,GAAG,EAAE;MAAW,GAAC,cAAwB,CAAC,eACtDpE,MAAA,CAAAuC,OAAA,CAAAQ,aAAA,CAACtC,OAAA,CAAA4D,aAAa;QAACJ,OAAO,EAAE/B;MAAS,GAAC,aAA0B,CACxD,CAAC,eACTlC,MAAA,CAAAuC,OAAA,CAAAQ,aAAA,CAACvC,WAAA,CAAA2D,UAAU;QAACC,GAAG,EAAE;MAAU,gBACvBpE,MAAA,CAAAuC,OAAA,CAAAQ,aAAA,CAACrB,gBAAgB,QAAC,yEAGA,CACV,CACN,CAAC;IAAA,CACd,CAAC,EACDyB,MAAM,CAAC;MAAA,oBACJnD,MAAA,CAAAuC,OAAA,CAAAQ,aAAA,CAACzB,MAAM,qBACHtB,MAAA,CAAAuC,OAAA,CAAAQ,aAAA,CAACvC,WAAA,CAAA2D,UAAU;QAACC,GAAG,EAAE;MAAW,GAAC,cAAwB,CAAC,eACtDpE,MAAA,CAAAuC,OAAA,CAAAQ,aAAA,CAACtC,OAAA,CAAA4D,aAAa;QAACJ,OAAO,EAAE/B;MAAS,GAAC,aAA0B,CACxD,CAAC;IAAA,CACZ,CACH,CAAC;EAAA,CAEM,CAAC;AAE1B,CAAC;AAACoC,OAAA,CAAA1C,OAAA,GAAAA,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-file-manager",
|
|
3
|
-
"version": "5.39.7-beta.
|
|
3
|
+
"version": "5.39.7-beta.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
"@emotion/styled": "11.10.6",
|
|
18
18
|
"@material-design-icons/svg": "0.14.3",
|
|
19
19
|
"@types/react": "17.0.39",
|
|
20
|
-
"@webiny/app": "5.39.7-beta.
|
|
21
|
-
"@webiny/app-aco": "5.39.7-beta.
|
|
22
|
-
"@webiny/app-admin": "5.39.7-beta.
|
|
23
|
-
"@webiny/app-headless-cms": "5.39.7-beta.
|
|
24
|
-
"@webiny/app-headless-cms-common": "5.39.7-beta.
|
|
25
|
-
"@webiny/app-security": "5.39.7-beta.
|
|
26
|
-
"@webiny/error": "5.39.7-beta.
|
|
27
|
-
"@webiny/form": "5.39.7-beta.
|
|
28
|
-
"@webiny/plugins": "5.39.7-beta.
|
|
29
|
-
"@webiny/react-composition": "5.39.7-beta.
|
|
30
|
-
"@webiny/react-properties": "5.39.7-beta.
|
|
31
|
-
"@webiny/ui": "5.39.7-beta.
|
|
32
|
-
"@webiny/utils": "5.39.7-beta.
|
|
33
|
-
"@webiny/validation": "5.39.7-beta.
|
|
20
|
+
"@webiny/app": "5.39.7-beta.3",
|
|
21
|
+
"@webiny/app-aco": "5.39.7-beta.3",
|
|
22
|
+
"@webiny/app-admin": "5.39.7-beta.3",
|
|
23
|
+
"@webiny/app-headless-cms": "5.39.7-beta.3",
|
|
24
|
+
"@webiny/app-headless-cms-common": "5.39.7-beta.3",
|
|
25
|
+
"@webiny/app-security": "5.39.7-beta.3",
|
|
26
|
+
"@webiny/error": "5.39.7-beta.3",
|
|
27
|
+
"@webiny/form": "5.39.7-beta.3",
|
|
28
|
+
"@webiny/plugins": "5.39.7-beta.3",
|
|
29
|
+
"@webiny/react-composition": "5.39.7-beta.3",
|
|
30
|
+
"@webiny/react-properties": "5.39.7-beta.3",
|
|
31
|
+
"@webiny/ui": "5.39.7-beta.3",
|
|
32
|
+
"@webiny/utils": "5.39.7-beta.3",
|
|
33
|
+
"@webiny/validation": "5.39.7-beta.3",
|
|
34
34
|
"apollo-cache": "1.3.5",
|
|
35
35
|
"apollo-client": "2.6.10",
|
|
36
36
|
"apollo-link": "1.2.14",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"@babel/preset-react": "7.22.5",
|
|
65
65
|
"@babel/preset-typescript": "7.22.5",
|
|
66
66
|
"@svgr/webpack": "6.5.1",
|
|
67
|
-
"@webiny/cli": "5.39.7-beta.
|
|
68
|
-
"@webiny/project-utils": "5.39.7-beta.
|
|
67
|
+
"@webiny/cli": "5.39.7-beta.3",
|
|
68
|
+
"@webiny/project-utils": "5.39.7-beta.3",
|
|
69
69
|
"rimraf": "3.0.2",
|
|
70
70
|
"ttypescript": "1.5.15",
|
|
71
71
|
"typescript": "4.7.4"
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"build": "yarn webiny run build",
|
|
79
79
|
"watch": "yarn webiny run watch"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "49e39588e8ccf2acd3351643856692f8011c5136"
|
|
82
82
|
}
|