@webiny/app-aco 6.5.0 → 6.5.1-beta.1

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.
@@ -1,6 +1,6 @@
1
1
  import react from "react";
2
2
  import { Bind } from "@webiny/form";
3
- import { Switch } from "@webiny/admin-ui";
3
+ import { SwitchPrimitive } from "@webiny/admin-ui";
4
4
  import { Operation } from "../../../domain/index.js";
5
5
  const OperationSelector = ({ label, name })=>{
6
6
  const getValue = (value)=>value === Operation.AND;
@@ -10,7 +10,7 @@ const OperationSelector = ({ label, name })=>{
10
10
  };
11
11
  return /*#__PURE__*/ react.createElement(Bind, {
12
12
  name: name
13
- }, ({ value, onChange })=>/*#__PURE__*/ react.createElement(Switch, {
13
+ }, ({ value, onChange })=>/*#__PURE__*/ react.createElement(SwitchPrimitive, {
14
14
  label: label,
15
15
  checked: getValue(value),
16
16
  onChange: (value)=>onChange(setValue(value))
@@ -1 +1 @@
1
- {"version":3,"file":"components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/components/OperationSelector.js","sources":["../../../../../../src/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/components/OperationSelector.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Bind } from \"@webiny/form\";\nimport { Switch } from \"@webiny/admin-ui\";\nimport { Operation } from \"~/components/AdvancedSearch/domain/index.js\";\n\ninterface OperationSelectorProps {\n label: string;\n name: string;\n}\n\nexport const OperationSelector = ({ label, name }: OperationSelectorProps) => {\n const getValue = (value: Operation): boolean => {\n return value === Operation.AND;\n };\n\n const setValue = (value: boolean): Operation => {\n if (value) {\n return Operation.AND;\n } else {\n return Operation.OR;\n }\n };\n\n return (\n <Bind name={name}>\n {({ value, onChange }) => (\n <Switch\n label={label}\n checked={getValue(value)}\n onChange={value => onChange(setValue(value))}\n />\n )}\n </Bind>\n );\n};\n"],"names":["OperationSelector","label","name","getValue","value","Operation","setValue","Bind","onChange","Switch"],"mappings":";;;;AAWO,MAAMA,oBAAoB,CAAC,EAAEC,KAAK,EAAEC,IAAI,EAA0B;IACrE,MAAMC,WAAW,CAACC,QACPA,UAAUC,UAAU,GAAG;IAGlC,MAAMC,WAAW,CAACF;QACd,IAAIA,OACA,OAAOC,UAAU,GAAG;aAEpB,OAAOA,UAAU,EAAE;IAE3B;IAEA,OAAO,WAAP,GACI,oBAACE,MAAIA;QAAC,MAAML;OACP,CAAC,EAAEE,KAAK,EAAEI,QAAQ,EAAE,iBACjB,oBAACC,QAAMA;YACH,OAAOR;YACP,SAASE,SAASC;YAClB,UAAUA,CAAAA,QAASI,SAASF,SAASF;;AAKzD"}
1
+ {"version":3,"file":"components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/components/OperationSelector.js","sources":["../../../../../../src/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/components/OperationSelector.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Bind } from \"@webiny/form\";\nimport { SwitchPrimitive } from \"@webiny/admin-ui\";\nimport { Operation } from \"~/components/AdvancedSearch/domain/index.js\";\n\ninterface OperationSelectorProps {\n label: string;\n name: string;\n}\n\nexport const OperationSelector = ({ label, name }: OperationSelectorProps) => {\n const getValue = (value: Operation): boolean => {\n return value === Operation.AND;\n };\n\n const setValue = (value: boolean): Operation => {\n if (value) {\n return Operation.AND;\n } else {\n return Operation.OR;\n }\n };\n\n return (\n <Bind name={name}>\n {({ value, onChange }) => (\n // The primitive keeps the label inline: both call sites put this switch in a\n // header row, next to a title, not in a form with a label above it.\n <SwitchPrimitive\n label={label}\n checked={getValue(value)}\n onChange={value => onChange(setValue(value))}\n />\n )}\n </Bind>\n );\n};\n"],"names":["OperationSelector","label","name","getValue","value","Operation","setValue","Bind","onChange","SwitchPrimitive"],"mappings":";;;;AAWO,MAAMA,oBAAoB,CAAC,EAAEC,KAAK,EAAEC,IAAI,EAA0B;IACrE,MAAMC,WAAW,CAACC,QACPA,UAAUC,UAAU,GAAG;IAGlC,MAAMC,WAAW,CAACF;QACd,IAAIA,OACA,OAAOC,UAAU,GAAG;aAEpB,OAAOA,UAAU,EAAE;IAE3B;IAEA,OAAO,WAAP,GACI,oBAACE,MAAIA;QAAC,MAAML;OACP,CAAC,EAAEE,KAAK,EAAEI,QAAQ,EAAE,G,cAGjB,oBAACC,iBAAeA;YACZ,OAAOR;YACP,SAASE,SAASC;YAClB,UAAUA,CAAAA,QAASI,SAASF,SAASF;;AAKzD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-aco",
3
- "version": "6.5.0",
3
+ "version": "6.5.1-beta.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -15,20 +15,20 @@
15
15
  "author": "Webiny Ltd.",
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "@webiny/admin-ui": "6.5.0",
19
- "@webiny/app": "6.5.0",
20
- "@webiny/app-admin": "6.5.0",
21
- "@webiny/app-headless-cms-common": "6.5.0",
22
- "@webiny/app-utils": "6.5.0",
23
- "@webiny/feature": "6.5.0",
24
- "@webiny/form": "6.5.0",
25
- "@webiny/icons": "6.5.0",
26
- "@webiny/react-properties": "6.5.0",
27
- "@webiny/shared-aco": "6.5.0",
28
- "@webiny/utils": "6.5.0",
29
- "@webiny/validation": "6.5.0",
18
+ "@webiny/admin-ui": "6.5.1-beta.1",
19
+ "@webiny/app": "6.5.1-beta.1",
20
+ "@webiny/app-admin": "6.5.1-beta.1",
21
+ "@webiny/app-headless-cms-common": "6.5.1-beta.1",
22
+ "@webiny/app-utils": "6.5.1-beta.1",
23
+ "@webiny/feature": "6.5.1-beta.1",
24
+ "@webiny/form": "6.5.1-beta.1",
25
+ "@webiny/icons": "6.5.1-beta.1",
26
+ "@webiny/react-properties": "6.5.1-beta.1",
27
+ "@webiny/shared-aco": "6.5.1-beta.1",
28
+ "@webiny/utils": "6.5.1-beta.1",
29
+ "@webiny/validation": "6.5.1-beta.1",
30
30
  "lodash": "4.18.1",
31
- "mobx": "7.0.6",
31
+ "mobx": "7.1.1",
32
32
  "mobx-react-lite": "5.1.0",
33
33
  "react": "18.3.1",
34
34
  "react-dom": "18.3.1",
@@ -37,9 +37,9 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/react": "18.3.31",
40
- "@webiny/build-tools": "6.5.0",
40
+ "@webiny/build-tools": "6.5.1-beta.1",
41
41
  "@webiny/di": "1.1.0",
42
- "@webiny/wcp": "6.5.0",
42
+ "@webiny/wcp": "6.5.1-beta.1",
43
43
  "rimraf": "6.1.3",
44
44
  "typescript": "7.0.2",
45
45
  "vitest": "5.0.5"