@plasmicpkgs/plasmic-cms 0.0.99 → 0.0.102
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/plasmic-cms.cjs.development.js +10 -10
- 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 +10 -10
- package/dist/plasmic-cms.esm.js.map +1 -1
- package/package.json +3 -3
|
@@ -1110,19 +1110,19 @@ function mkApi(config) {
|
|
|
1110
1110
|
return new API(config);
|
|
1111
1111
|
}
|
|
1112
1112
|
|
|
1113
|
-
var contextPrefix = "
|
|
1114
|
-
var databaseContextKey = contextPrefix + "
|
|
1115
|
-
var tablesContextKey = contextPrefix + "
|
|
1116
|
-
var
|
|
1113
|
+
var contextPrefix = "plasmicCms";
|
|
1114
|
+
var databaseContextKey = contextPrefix + "Database";
|
|
1115
|
+
var tablesContextKey = contextPrefix + "Tables";
|
|
1116
|
+
var collectionResultSuffix = "Collection";
|
|
1117
1117
|
|
|
1118
1118
|
var mkQueryContextKey = function mkQueryContextKey(table) {
|
|
1119
|
-
return "" +
|
|
1119
|
+
return "" + contextPrefix + table + collectionResultSuffix;
|
|
1120
1120
|
};
|
|
1121
1121
|
|
|
1122
|
-
var
|
|
1122
|
+
var itemContextSuffix = "Item";
|
|
1123
1123
|
|
|
1124
1124
|
var mkRowContextKey = function mkRowContextKey(table) {
|
|
1125
|
-
return "" +
|
|
1125
|
+
return "" + contextPrefix + table + itemContextSuffix;
|
|
1126
1126
|
};
|
|
1127
1127
|
|
|
1128
1128
|
function useDatabase() {
|
|
@@ -1148,9 +1148,9 @@ function TablesProvider(_ref2) {
|
|
|
1148
1148
|
}, children);
|
|
1149
1149
|
}
|
|
1150
1150
|
|
|
1151
|
-
function getClosestMatchingKeys(env,
|
|
1151
|
+
function getClosestMatchingKeys(env, suffix) {
|
|
1152
1152
|
return [].concat(Object.keys(env).reverse()).filter(function (k) {
|
|
1153
|
-
return k.
|
|
1153
|
+
return k.endsWith(suffix);
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
@@ -1175,7 +1175,7 @@ function useTablesWithDataLoaded() {
|
|
|
1175
1175
|
return undefined;
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
|
-
var matchingKeys = getClosestMatchingKeys(env,
|
|
1178
|
+
var matchingKeys = getClosestMatchingKeys(env, itemContextSuffix);
|
|
1179
1179
|
return tables.filter(function (table) {
|
|
1180
1180
|
return matchingKeys.some(function (key) {
|
|
1181
1181
|
return mkRowContextKey(table.identifier) === key;
|