@plasmicpkgs/plasmic-cms 0.0.103 → 0.0.106
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/dist/context.d.ts +1 -1
- package/dist/plasmic-cms.cjs.development.js +7 -9
- package/dist/plasmic-cms.cjs.development.js.map +1 -1
- package/dist/plasmic-cms.cjs.production.min.js +1 -1
- package/dist/plasmic-cms.cjs.production.min.js.map +1 -1
- package/dist/plasmic-cms.esm.js +7 -9
- package/dist/plasmic-cms.esm.js.map +1 -1
- package/package.json +5 -5
package/dist/context.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare function DatabaseProvider({ config, children, }: {
|
|
|
9
9
|
export declare function useTables(): ApiCmsTable[] | undefined;
|
|
10
10
|
export declare function TablesProvider({ children, tables, }: {
|
|
11
11
|
children?: React.ReactNode;
|
|
12
|
-
tables
|
|
12
|
+
tables?: ApiCmsTable[];
|
|
13
13
|
}): JSX.Element;
|
|
14
14
|
export declare function useQueryResults(table?: string): {
|
|
15
15
|
table: string;
|
|
@@ -1133,7 +1133,8 @@ function DatabaseProvider(_ref) {
|
|
|
1133
1133
|
children = _ref.children;
|
|
1134
1134
|
return React__default.createElement(host.DataProvider, {
|
|
1135
1135
|
name: databaseContextKey,
|
|
1136
|
-
data: config
|
|
1136
|
+
data: config,
|
|
1137
|
+
hidden: true
|
|
1137
1138
|
}, children);
|
|
1138
1139
|
}
|
|
1139
1140
|
function useTables() {
|
|
@@ -1144,7 +1145,8 @@ function TablesProvider(_ref2) {
|
|
|
1144
1145
|
tables = _ref2.tables;
|
|
1145
1146
|
return React__default.createElement(host.DataProvider, {
|
|
1146
1147
|
name: tablesContextKey,
|
|
1147
|
-
data: tables
|
|
1148
|
+
data: tables,
|
|
1149
|
+
hidden: true
|
|
1148
1150
|
}, children);
|
|
1149
1151
|
}
|
|
1150
1152
|
|
|
@@ -1368,13 +1370,9 @@ function TablesFetcher(_ref2) {
|
|
|
1368
1370
|
}, _callee);
|
|
1369
1371
|
})));
|
|
1370
1372
|
var inEditor = !!React.useContext(host.PlasmicCanvasContext);
|
|
1371
|
-
return
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
}, children);
|
|
1375
|
-
}, {
|
|
1376
|
-
hideIfNotFound: false
|
|
1377
|
-
}, inEditor, children);
|
|
1373
|
+
return React__default.createElement(TablesProvider, {
|
|
1374
|
+
tables: maybeData.data
|
|
1375
|
+
}, inEditor && maybeData.error ? React__default.createElement("div", null, "CMS Error: ", maybeData.error.message) : children);
|
|
1378
1376
|
}
|
|
1379
1377
|
|
|
1380
1378
|
function isDatabaseConfigured(config) {
|