dara-core 1.17.5__py3-none-any.whl → 1.18.0__py3-none-any.whl
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.
- dara/core/__init__.py +2 -0
- dara/core/actions.py +1 -2
- dara/core/auth/basic.py +9 -9
- dara/core/auth/routes.py +5 -5
- dara/core/auth/utils.py +4 -4
- dara/core/base_definitions.py +15 -22
- dara/core/cli.py +8 -7
- dara/core/configuration.py +5 -2
- dara/core/css.py +1 -2
- dara/core/data_utils.py +2 -2
- dara/core/defaults.py +4 -7
- dara/core/definitions.py +6 -9
- dara/core/http.py +7 -3
- dara/core/interactivity/actions.py +28 -30
- dara/core/interactivity/any_data_variable.py +6 -5
- dara/core/interactivity/any_variable.py +4 -7
- dara/core/interactivity/data_variable.py +1 -1
- dara/core/interactivity/derived_data_variable.py +7 -6
- dara/core/interactivity/derived_variable.py +93 -33
- dara/core/interactivity/filtering.py +19 -27
- dara/core/interactivity/plain_variable.py +3 -2
- dara/core/interactivity/switch_variable.py +4 -4
- dara/core/internal/cache_store/base_impl.py +2 -1
- dara/core/internal/cache_store/cache_store.py +17 -5
- dara/core/internal/cache_store/keep_all.py +4 -1
- dara/core/internal/cache_store/lru.py +5 -1
- dara/core/internal/cache_store/ttl.py +4 -1
- dara/core/internal/cgroup.py +1 -1
- dara/core/internal/dependency_resolution.py +46 -10
- dara/core/internal/devtools.py +2 -2
- dara/core/internal/download.py +4 -3
- dara/core/internal/encoder_registry.py +7 -7
- dara/core/internal/execute_action.py +4 -10
- dara/core/internal/hashing.py +1 -3
- dara/core/internal/import_discovery.py +3 -4
- dara/core/internal/normalization.py +9 -13
- dara/core/internal/pandas_utils.py +3 -3
- dara/core/internal/pool/task_pool.py +16 -10
- dara/core/internal/pool/utils.py +5 -7
- dara/core/internal/pool/worker.py +3 -2
- dara/core/internal/port_utils.py +1 -1
- dara/core/internal/registries.py +9 -4
- dara/core/internal/registry.py +3 -1
- dara/core/internal/registry_lookup.py +7 -3
- dara/core/internal/routing.py +77 -44
- dara/core/internal/scheduler.py +13 -8
- dara/core/internal/settings.py +2 -2
- dara/core/internal/tasks.py +8 -14
- dara/core/internal/utils.py +11 -10
- dara/core/internal/websocket.py +18 -19
- dara/core/js_tooling/js_utils.py +23 -24
- dara/core/logging.py +3 -6
- dara/core/main.py +14 -11
- dara/core/metrics/cache.py +1 -1
- dara/core/metrics/utils.py +3 -3
- dara/core/persistence.py +1 -1
- dara/core/umd/dara.core.umd.js +149 -128
- dara/core/visual/components/__init__.py +2 -2
- dara/core/visual/components/fallback.py +3 -3
- dara/core/visual/css/__init__.py +30 -31
- dara/core/visual/dynamic_component.py +10 -11
- dara/core/visual/progress_updater.py +4 -3
- {dara_core-1.17.5.dist-info → dara_core-1.18.0.dist-info}/METADATA +10 -10
- dara_core-1.18.0.dist-info/RECORD +114 -0
- dara_core-1.17.5.dist-info/RECORD +0 -114
- {dara_core-1.17.5.dist-info → dara_core-1.18.0.dist-info}/LICENSE +0 -0
- {dara_core-1.17.5.dist-info → dara_core-1.18.0.dist-info}/WHEEL +0 -0
- {dara_core-1.17.5.dist-info → dara_core-1.18.0.dist-info}/entry_points.txt +0 -0
dara/core/umd/dara.core.umd.js
CHANGED
|
@@ -50069,6 +50069,9 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50069
50069
|
}
|
|
50070
50070
|
async function handleAuthErrors(res, toLogin = false, ignoreErrors = null) {
|
|
50071
50071
|
var _a;
|
|
50072
|
+
if (res.status >= 500 || res.status < 400) {
|
|
50073
|
+
return false;
|
|
50074
|
+
}
|
|
50072
50075
|
const content = await res.clone().json();
|
|
50073
50076
|
if (isAuthenticationError(content == null ? void 0 : content.detail) && !shouldIgnoreError(content == null ? void 0 : content.detail, ignoreErrors != null ? ignoreErrors : [])) {
|
|
50074
50077
|
localStorage.removeItem(getTokenKey());
|
|
@@ -52947,13 +52950,107 @@ Inferred class string: "${iconClasses}."`
|
|
|
52947
52950
|
atomRegistry.set(variable.uid, Recoil_index_8({ default: true, key: variable.uid }));
|
|
52948
52951
|
}
|
|
52949
52952
|
}
|
|
52953
|
+
var baseSet = _baseSet;
|
|
52954
|
+
function set(object2, path, value) {
|
|
52955
|
+
return object2 == null ? object2 : baseSet(object2, path, value);
|
|
52956
|
+
}
|
|
52957
|
+
var set_1 = set;
|
|
52958
|
+
function getOrRegisterTrigger(variable) {
|
|
52959
|
+
const triggerKey = getRegistryKey(variable, "trigger");
|
|
52960
|
+
if (!atomRegistry.has(triggerKey)) {
|
|
52961
|
+
atomRegistry.set(
|
|
52962
|
+
triggerKey,
|
|
52963
|
+
Recoil_index_8({
|
|
52964
|
+
default: {
|
|
52965
|
+
force_key: null,
|
|
52966
|
+
inc: 0
|
|
52967
|
+
},
|
|
52968
|
+
key: triggerKey
|
|
52969
|
+
})
|
|
52970
|
+
);
|
|
52971
|
+
}
|
|
52972
|
+
return atomRegistry.get(triggerKey);
|
|
52973
|
+
}
|
|
52974
|
+
function getOrRegisterDataVariableTrigger(variable, wsClient) {
|
|
52975
|
+
const key = `${variable.uid}-data`;
|
|
52976
|
+
if (!dataRegistry.has(key)) {
|
|
52977
|
+
dataRegistry.set(
|
|
52978
|
+
key,
|
|
52979
|
+
Recoil_index_8({
|
|
52980
|
+
default: {
|
|
52981
|
+
force_key: null,
|
|
52982
|
+
inc: 0
|
|
52983
|
+
},
|
|
52984
|
+
effects: [
|
|
52985
|
+
({ setSelf }) => {
|
|
52986
|
+
const subscription = wsClient.serverTriggers$(variable.uid).subscribe(() => {
|
|
52987
|
+
setSelf((v2) => {
|
|
52988
|
+
if (typeof v2 === "object" && "inc" in v2) {
|
|
52989
|
+
return {
|
|
52990
|
+
force_key: nanoid(),
|
|
52991
|
+
inc: v2.inc + 1
|
|
52992
|
+
};
|
|
52993
|
+
}
|
|
52994
|
+
return {
|
|
52995
|
+
force_key: nanoid(),
|
|
52996
|
+
inc: 1
|
|
52997
|
+
};
|
|
52998
|
+
});
|
|
52999
|
+
});
|
|
53000
|
+
return () => {
|
|
53001
|
+
subscription == null ? void 0 : subscription.unsubscribe();
|
|
53002
|
+
};
|
|
53003
|
+
}
|
|
53004
|
+
],
|
|
53005
|
+
key
|
|
53006
|
+
})
|
|
53007
|
+
);
|
|
53008
|
+
}
|
|
53009
|
+
return dataRegistry.get(key);
|
|
53010
|
+
}
|
|
53011
|
+
function buildTriggerList(variables) {
|
|
53012
|
+
const triggers = [];
|
|
53013
|
+
function walk(vars, path) {
|
|
53014
|
+
for (const [idx, variable] of vars.entries()) {
|
|
53015
|
+
if (isDerivedVariable(variable) || isDerivedDataVariable(variable)) {
|
|
53016
|
+
const varPath = [...path, String(idx)];
|
|
53017
|
+
triggers.push({
|
|
53018
|
+
path: varPath,
|
|
53019
|
+
variable
|
|
53020
|
+
});
|
|
53021
|
+
walk(variable.variables, [...varPath, "values"]);
|
|
53022
|
+
}
|
|
53023
|
+
if (isDataVariable(variable)) {
|
|
53024
|
+
triggers.push({
|
|
53025
|
+
path: path.length > 0 ? path.slice(0, -1) : [],
|
|
53026
|
+
variable
|
|
53027
|
+
});
|
|
53028
|
+
}
|
|
53029
|
+
}
|
|
53030
|
+
}
|
|
53031
|
+
walk(variables, []);
|
|
53032
|
+
return triggers;
|
|
53033
|
+
}
|
|
53034
|
+
function registerChildTriggers(triggerList, wsClient, registerFunc = Recoil_index_20) {
|
|
53035
|
+
return triggerList.map((triggerInfo) => {
|
|
53036
|
+
if (isDerivedVariable(triggerInfo.variable) || isDerivedDataVariable(triggerInfo.variable)) {
|
|
53037
|
+
const triggerIndex = getOrRegisterTrigger(triggerInfo.variable);
|
|
53038
|
+
return registerFunc(triggerIndex);
|
|
53039
|
+
}
|
|
53040
|
+
if (isDataVariable(triggerInfo.variable)) {
|
|
53041
|
+
const serverTrigger = getOrRegisterDataVariableTrigger(triggerInfo.variable, wsClient);
|
|
53042
|
+
return registerFunc(serverTrigger);
|
|
53043
|
+
}
|
|
53044
|
+
throw new Error("Invalid trigger variable type");
|
|
53045
|
+
});
|
|
53046
|
+
}
|
|
52950
53047
|
function isTaskResponse$1(dvResponse) {
|
|
52951
53048
|
return "task_id" in dvResponse;
|
|
52952
53049
|
}
|
|
52953
53050
|
async function fetchDerivedVariable({
|
|
52954
53051
|
cache: cache2,
|
|
52955
|
-
force,
|
|
52956
53052
|
extras,
|
|
53053
|
+
force_key,
|
|
52957
53054
|
variableUid,
|
|
52958
53055
|
values,
|
|
52959
53056
|
wsClient,
|
|
@@ -52966,7 +53063,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
52966
53063
|
const res = await request(
|
|
52967
53064
|
`/api/core/derived-variable/${variableUid}`,
|
|
52968
53065
|
{
|
|
52969
|
-
body: JSON.stringify({
|
|
53066
|
+
body: JSON.stringify({ is_data_variable, values, ws_channel, force_key: force_key != null ? force_key : null }),
|
|
52970
53067
|
headers: { ...cacheControl },
|
|
52971
53068
|
method: HTTP_METHOD.POST
|
|
52972
53069
|
},
|
|
@@ -52983,9 +53080,9 @@ Inferred class string: "${iconClasses}."`
|
|
|
52983
53080
|
selectorKey,
|
|
52984
53081
|
values,
|
|
52985
53082
|
wsClient,
|
|
52986
|
-
force,
|
|
52987
53083
|
extras,
|
|
52988
53084
|
cache: cache2,
|
|
53085
|
+
force_key,
|
|
52989
53086
|
is_data_variable = false
|
|
52990
53087
|
}) {
|
|
52991
53088
|
if (!debouncedFetchSubjects[selectorKey]) {
|
|
@@ -53000,7 +53097,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
53000
53097
|
debouncedFetchSubjects[selectorKey].next({
|
|
53001
53098
|
cache: cache2,
|
|
53002
53099
|
extras,
|
|
53003
|
-
|
|
53100
|
+
force_key,
|
|
53004
53101
|
is_data_variable,
|
|
53005
53102
|
selectorKey,
|
|
53006
53103
|
values,
|
|
@@ -53058,8 +53155,9 @@ Inferred class string: "${iconClasses}."`
|
|
|
53058
53155
|
function useTriggerIndex(variable) {
|
|
53059
53156
|
return Recoil_index_20(getOrRegisterTrigger(variable));
|
|
53060
53157
|
}
|
|
53061
|
-
|
|
53062
|
-
const
|
|
53158
|
+
function resolveDerivedValue(key, variables, deps, resolvedVariables, wsClient, get2, selfTrigger) {
|
|
53159
|
+
const triggerList = buildTriggerList(variables);
|
|
53160
|
+
const triggers = registerChildTriggers(triggerList, wsClient, get2);
|
|
53063
53161
|
if (selfTrigger) {
|
|
53064
53162
|
triggers.unshift(selfTrigger);
|
|
53065
53163
|
}
|
|
@@ -53071,9 +53169,6 @@ Inferred class string: "${iconClasses}."`
|
|
|
53071
53169
|
}
|
|
53072
53170
|
return acc.set(getUniqueIdentifier(v2), depsValues[idx]);
|
|
53073
53171
|
}, /* @__PURE__ */ new Map());
|
|
53074
|
-
let recalculateForced = false;
|
|
53075
|
-
let wasTriggered = false;
|
|
53076
|
-
let wasTriggeredItself = false;
|
|
53077
53172
|
const previousEntry = depsRegistry.get(key);
|
|
53078
53173
|
const relevantValues = deps.filter(isVariable).map((dep) => variableValueMap.get(getUniqueIdentifier(dep))).concat(triggers.map((trigger) => trigger.inc));
|
|
53079
53174
|
if (previousEntry) {
|
|
@@ -53087,23 +53182,33 @@ Inferred class string: "${iconClasses}."`
|
|
|
53087
53182
|
const previousTriggerCounters = previousEntry.args.slice(
|
|
53088
53183
|
previousEntry.args.length - triggers.length
|
|
53089
53184
|
);
|
|
53185
|
+
let selfTriggerForceKey = null;
|
|
53090
53186
|
for (const [idx, triggerValue] of triggers.entries()) {
|
|
53091
53187
|
if (triggerValue.inc !== previousTriggerCounters[idx]) {
|
|
53092
|
-
|
|
53093
|
-
|
|
53094
|
-
|
|
53188
|
+
if (selfTrigger && idx === 0) {
|
|
53189
|
+
selfTriggerForceKey = triggerValue.force_key;
|
|
53190
|
+
} else if (triggerValue.force_key) {
|
|
53191
|
+
const valueIndex = selfTrigger ? idx - 1 : idx;
|
|
53192
|
+
const triggerInfo = triggerList[valueIndex];
|
|
53193
|
+
if (triggerInfo.path.length === 0) {
|
|
53194
|
+
selfTriggerForceKey = triggerValue.force_key;
|
|
53195
|
+
} else {
|
|
53196
|
+
set_1(values, [...triggerInfo.path, "force_key"], triggerValue.force_key);
|
|
53197
|
+
}
|
|
53095
53198
|
}
|
|
53096
|
-
wasTriggered = true;
|
|
53097
53199
|
break;
|
|
53098
53200
|
}
|
|
53099
53201
|
}
|
|
53100
|
-
|
|
53101
|
-
|
|
53102
|
-
|
|
53202
|
+
return {
|
|
53203
|
+
relevantValues,
|
|
53204
|
+
selfTriggerForceKey,
|
|
53205
|
+
type: "current",
|
|
53206
|
+
values
|
|
53207
|
+
};
|
|
53103
53208
|
}
|
|
53104
53209
|
return {
|
|
53105
|
-
force: recalculateForced,
|
|
53106
53210
|
relevantValues,
|
|
53211
|
+
selfTriggerForceKey: null,
|
|
53107
53212
|
type: "current",
|
|
53108
53213
|
values
|
|
53109
53214
|
};
|
|
@@ -53128,7 +53233,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
53128
53233
|
const selfTrigger = get2(getOrRegisterTrigger(variable));
|
|
53129
53234
|
const { extras } = extrasSerializable;
|
|
53130
53235
|
const selectorKey = key + extrasSerializable.toJSON();
|
|
53131
|
-
const derivedResult =
|
|
53236
|
+
const derivedResult = resolveDerivedValue(
|
|
53132
53237
|
selectorKey,
|
|
53133
53238
|
variable.variables,
|
|
53134
53239
|
variable.deps,
|
|
@@ -53145,10 +53250,10 @@ Inferred class string: "${iconClasses}."`
|
|
|
53145
53250
|
variableResponse = await debouncedFetchDerivedVariable({
|
|
53146
53251
|
cache: variable.cache,
|
|
53147
53252
|
extras,
|
|
53148
|
-
|
|
53253
|
+
force_key: derivedResult.selfTriggerForceKey,
|
|
53149
53254
|
is_data_variable: isDerivedDataVariable(variable),
|
|
53150
53255
|
selectorKey,
|
|
53151
|
-
values: normalizeRequest(cleanArgs(derivedResult.values
|
|
53256
|
+
values: normalizeRequest(cleanArgs(derivedResult.values), variable.variables),
|
|
53152
53257
|
variableUid: variable.uid,
|
|
53153
53258
|
wsClient
|
|
53154
53259
|
});
|
|
@@ -53243,7 +53348,10 @@ Inferred class string: "${iconClasses}."`
|
|
|
53243
53348
|
const triggerIndex = React.useMemo(() => getOrRegisterTrigger(variable), []);
|
|
53244
53349
|
const triggerUpdates = Recoil_index_24(triggerIndex);
|
|
53245
53350
|
const trigger = React.useCallback(
|
|
53246
|
-
(force = true) => triggerUpdates((val) => ({
|
|
53351
|
+
(force = true) => triggerUpdates((val) => ({
|
|
53352
|
+
force_key: force ? nanoid() : null,
|
|
53353
|
+
inc: val.inc + 1
|
|
53354
|
+
})),
|
|
53247
53355
|
[triggerUpdates]
|
|
53248
53356
|
);
|
|
53249
53357
|
useInterval(trigger, variable.polling_interval);
|
|
@@ -53286,87 +53394,6 @@ Inferred class string: "${iconClasses}."`
|
|
|
53286
53394
|
cloned[key] = nested.length === 1 ? newValue : setNested(cloned[key], nested.slice(1), newValue);
|
|
53287
53395
|
return cloned;
|
|
53288
53396
|
}
|
|
53289
|
-
function getOrRegisterTrigger(variable) {
|
|
53290
|
-
const triggerKey = getRegistryKey(variable, "trigger");
|
|
53291
|
-
if (!atomRegistry.has(triggerKey)) {
|
|
53292
|
-
atomRegistry.set(
|
|
53293
|
-
triggerKey,
|
|
53294
|
-
Recoil_index_8({
|
|
53295
|
-
default: {
|
|
53296
|
-
force: false,
|
|
53297
|
-
inc: 0
|
|
53298
|
-
},
|
|
53299
|
-
key: triggerKey
|
|
53300
|
-
})
|
|
53301
|
-
);
|
|
53302
|
-
}
|
|
53303
|
-
return atomRegistry.get(triggerKey);
|
|
53304
|
-
}
|
|
53305
|
-
function getOrRegisterDataVariableTrigger(variable, wsClient) {
|
|
53306
|
-
const key = `${variable.uid}-data`;
|
|
53307
|
-
if (!dataRegistry.has(key)) {
|
|
53308
|
-
dataRegistry.set(
|
|
53309
|
-
key,
|
|
53310
|
-
Recoil_index_8({
|
|
53311
|
-
default: {
|
|
53312
|
-
force: true,
|
|
53313
|
-
inc: 0
|
|
53314
|
-
},
|
|
53315
|
-
effects: [
|
|
53316
|
-
({ setSelf }) => {
|
|
53317
|
-
const subscription = wsClient.serverTriggers$(variable.uid).subscribe(() => {
|
|
53318
|
-
setSelf((v2) => {
|
|
53319
|
-
if (typeof v2 === "object" && "inc" in v2) {
|
|
53320
|
-
return {
|
|
53321
|
-
force: true,
|
|
53322
|
-
inc: v2.inc + 1
|
|
53323
|
-
};
|
|
53324
|
-
}
|
|
53325
|
-
return {
|
|
53326
|
-
force: true,
|
|
53327
|
-
inc: 1
|
|
53328
|
-
};
|
|
53329
|
-
});
|
|
53330
|
-
});
|
|
53331
|
-
return () => {
|
|
53332
|
-
subscription == null ? void 0 : subscription.unsubscribe();
|
|
53333
|
-
};
|
|
53334
|
-
}
|
|
53335
|
-
],
|
|
53336
|
-
key
|
|
53337
|
-
})
|
|
53338
|
-
);
|
|
53339
|
-
}
|
|
53340
|
-
return dataRegistry.get(key);
|
|
53341
|
-
}
|
|
53342
|
-
function registerTriggers(variable, wsClient, registerFunc = Recoil_index_20) {
|
|
53343
|
-
const triggers = [];
|
|
53344
|
-
const triggerIndex = getOrRegisterTrigger(variable);
|
|
53345
|
-
triggers.push(registerFunc(triggerIndex));
|
|
53346
|
-
variable.variables.forEach((v2) => {
|
|
53347
|
-
if (isDerivedVariable(v2) || isDerivedDataVariable(v2)) {
|
|
53348
|
-
triggers.push(...registerTriggers(v2, wsClient, registerFunc));
|
|
53349
|
-
}
|
|
53350
|
-
if (isDataVariable(v2)) {
|
|
53351
|
-
const serverTrigger = getOrRegisterDataVariableTrigger(v2, wsClient);
|
|
53352
|
-
triggers.push(registerFunc(serverTrigger));
|
|
53353
|
-
}
|
|
53354
|
-
});
|
|
53355
|
-
return triggers;
|
|
53356
|
-
}
|
|
53357
|
-
function registerChildTriggers(variables, wsClient, registerFunc = Recoil_index_20) {
|
|
53358
|
-
const triggers = [];
|
|
53359
|
-
variables.forEach((v2) => {
|
|
53360
|
-
if (isDerivedVariable(v2) || isDerivedDataVariable(v2)) {
|
|
53361
|
-
triggers.push(...registerTriggers(v2, wsClient, registerFunc));
|
|
53362
|
-
}
|
|
53363
|
-
if (isDataVariable(v2)) {
|
|
53364
|
-
const serverTrigger = getOrRegisterDataVariableTrigger(v2, wsClient);
|
|
53365
|
-
triggers.push(registerFunc(serverTrigger));
|
|
53366
|
-
}
|
|
53367
|
-
});
|
|
53368
|
-
return triggers;
|
|
53369
|
-
}
|
|
53370
53397
|
function resolveVariable(variable, client, taskContext, extras, resolver = (val) => val) {
|
|
53371
53398
|
if (isDerivedVariable(variable) || isDerivedDataVariable(variable)) {
|
|
53372
53399
|
getOrRegisterDerivedVariable(variable, client, taskContext, extras);
|
|
@@ -53414,37 +53441,37 @@ Inferred class string: "${iconClasses}."`
|
|
|
53414
53441
|
}
|
|
53415
53442
|
return resolver(getOrRegisterPlainVariable(variable, client, taskContext, extras));
|
|
53416
53443
|
}
|
|
53417
|
-
function cleanValue(value,
|
|
53444
|
+
function cleanValue(value, forceKeyOverride) {
|
|
53418
53445
|
if (isResolvedDerivedVariable(value) || isResolvedDerivedDataVariable(value)) {
|
|
53419
53446
|
const { deps, ...rest } = value;
|
|
53420
|
-
const cleanedValues = value.values.map((v2) => cleanValue(v2
|
|
53447
|
+
const cleanedValues = value.values.map((v2) => cleanValue(v2));
|
|
53421
53448
|
return {
|
|
53422
53449
|
...rest,
|
|
53423
|
-
|
|
53450
|
+
force_key: forceKeyOverride != null ? forceKeyOverride : value.force_key || null,
|
|
53424
53451
|
values: cleanedValues
|
|
53425
53452
|
};
|
|
53426
53453
|
}
|
|
53427
53454
|
if (isResolvedSwitchVariable(value)) {
|
|
53428
53455
|
return {
|
|
53429
53456
|
...value,
|
|
53430
|
-
value: cleanValue(value.value,
|
|
53431
|
-
value_map: cleanValue(value.value_map,
|
|
53432
|
-
default: cleanValue(value.default,
|
|
53457
|
+
value: cleanValue(value.value, forceKeyOverride),
|
|
53458
|
+
value_map: cleanValue(value.value_map, forceKeyOverride),
|
|
53459
|
+
default: cleanValue(value.default, forceKeyOverride)
|
|
53433
53460
|
};
|
|
53434
53461
|
}
|
|
53435
53462
|
return value;
|
|
53436
53463
|
}
|
|
53437
|
-
function cleanKwargs(kwargs,
|
|
53464
|
+
function cleanKwargs(kwargs, forceKeyOverride) {
|
|
53438
53465
|
return Object.keys(kwargs).reduce(
|
|
53439
53466
|
(acc, k2) => {
|
|
53440
|
-
acc[k2] = cleanValue(kwargs[k2],
|
|
53467
|
+
acc[k2] = cleanValue(kwargs[k2], forceKeyOverride);
|
|
53441
53468
|
return acc;
|
|
53442
53469
|
},
|
|
53443
53470
|
{}
|
|
53444
53471
|
);
|
|
53445
53472
|
}
|
|
53446
|
-
function cleanArgs(values,
|
|
53447
|
-
return values.map((val) => cleanValue(val,
|
|
53473
|
+
function cleanArgs(values, forceKeyOverride) {
|
|
53474
|
+
return values.map((val) => cleanValue(val, forceKeyOverride));
|
|
53448
53475
|
}
|
|
53449
53476
|
/*!
|
|
53450
53477
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
@@ -54704,7 +54731,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
54704
54731
|
execution_id: executionId,
|
|
54705
54732
|
input,
|
|
54706
54733
|
uid: annotatedAction.uid,
|
|
54707
|
-
values: normalizeRequest(cleanKwargs(resolvedKwargs,
|
|
54734
|
+
values: normalizeRequest(cleanKwargs(resolvedKwargs, null), annotatedAction.dynamic_kwargs),
|
|
54708
54735
|
ws_channel
|
|
54709
54736
|
}),
|
|
54710
54737
|
method: HTTP_METHOD.POST
|
|
@@ -55044,10 +55071,10 @@ Inferred class string: "${iconClasses}."`
|
|
|
55044
55071
|
return fetchDerivedVariable({
|
|
55045
55072
|
cache: variable.cache,
|
|
55046
55073
|
extras: ctx.extras,
|
|
55047
|
-
|
|
55074
|
+
force_key: null,
|
|
55048
55075
|
selectorKey: resolved.uid,
|
|
55049
55076
|
values: normalizeRequest(
|
|
55050
|
-
cleanArgs(resolved.values
|
|
55077
|
+
cleanArgs(resolved.values),
|
|
55051
55078
|
variable.variables
|
|
55052
55079
|
),
|
|
55053
55080
|
variableUid: resolved.uid,
|
|
@@ -55379,7 +55406,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
55379
55406
|
triggerKey,
|
|
55380
55407
|
Recoil_index_8({
|
|
55381
55408
|
default: {
|
|
55382
|
-
|
|
55409
|
+
force_key: null,
|
|
55383
55410
|
inc: 0
|
|
55384
55411
|
},
|
|
55385
55412
|
key: triggerKey
|
|
@@ -55419,7 +55446,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
55419
55446
|
const triggerAtom = getOrRegisterComponentTrigger(uid2);
|
|
55420
55447
|
const selfTrigger = get2(triggerAtom);
|
|
55421
55448
|
const { extras } = extrasSerializable;
|
|
55422
|
-
const derivedResult =
|
|
55449
|
+
const derivedResult = resolveDerivedValue(
|
|
55423
55450
|
key,
|
|
55424
55451
|
kwargsList,
|
|
55425
55452
|
kwargsList,
|
|
@@ -55438,8 +55465,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
55438
55465
|
return acc;
|
|
55439
55466
|
},
|
|
55440
55467
|
{}
|
|
55441
|
-
)
|
|
55442
|
-
derivedResult.force
|
|
55468
|
+
)
|
|
55443
55469
|
);
|
|
55444
55470
|
let result = null;
|
|
55445
55471
|
try {
|
|
@@ -55532,7 +55558,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
55532
55558
|
({ set: set2 }) => () => {
|
|
55533
55559
|
const triggerAtom = getOrRegisterComponentTrigger(uid2, loop_instance_uid);
|
|
55534
55560
|
set2(triggerAtom, (triggerIndexValue) => ({
|
|
55535
|
-
|
|
55561
|
+
force_key: nanoid(),
|
|
55536
55562
|
inc: triggerIndexValue.inc + 1
|
|
55537
55563
|
}));
|
|
55538
55564
|
},
|
|
@@ -55652,11 +55678,6 @@ Inferred class string: "${iconClasses}."`
|
|
|
55652
55678
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
55653
55679
|
}
|
|
55654
55680
|
var isPlainObject_1 = isPlainObject;
|
|
55655
|
-
var baseSet = _baseSet;
|
|
55656
|
-
function set(object2, path, value) {
|
|
55657
|
-
return object2 == null ? object2 : baseSet(object2, path, value);
|
|
55658
|
-
}
|
|
55659
|
-
var set_1 = set;
|
|
55660
55681
|
function createMarkers(scope, loopInstanceUid) {
|
|
55661
55682
|
const markers = [];
|
|
55662
55683
|
if (scope.action) {
|
|
@@ -56882,7 +56903,7 @@ Inferred class string: "${iconClasses}."`
|
|
|
56882
56903
|
if (isDerivedVariable(variable) || isDerivedDataVariable(variable)) {
|
|
56883
56904
|
const triggerAtom = getOrRegisterTrigger(variable);
|
|
56884
56905
|
ctx.set(triggerAtom, (triggerIndexValue) => ({
|
|
56885
|
-
|
|
56906
|
+
force_key: nanoid(),
|
|
56886
56907
|
inc: triggerIndexValue.inc + 1
|
|
56887
56908
|
}));
|
|
56888
56909
|
} else if (isUrlVariable(variable)) {
|
|
@@ -56903,8 +56924,8 @@ Inferred class string: "${iconClasses}."`
|
|
|
56903
56924
|
const TriggerVariable = (ctx, actionImpl) => {
|
|
56904
56925
|
const triggerAtom = getOrRegisterTrigger(actionImpl.variable);
|
|
56905
56926
|
ctx.set(triggerAtom, (triggerIndexValue) => ({
|
|
56906
|
-
|
|
56907
|
-
|
|
56927
|
+
inc: triggerIndexValue.inc + 1,
|
|
56928
|
+
force_key: actionImpl.force ? nanoid() : null
|
|
56908
56929
|
}));
|
|
56909
56930
|
};
|
|
56910
56931
|
const INPUT = "__dara_input__";
|
|
@@ -16,11 +16,11 @@ limitations under the License.
|
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
18
|
from inspect import isclass
|
|
19
|
-
from typing import Optional # needed for model_rebuild
|
|
19
|
+
from typing import Optional # needed for model_rebuild # noqa: F401
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel
|
|
22
22
|
|
|
23
|
-
from dara.core.interactivity import Variable # needed for model_rebuild
|
|
23
|
+
from dara.core.interactivity import Variable # needed for model_rebuild # noqa: F401
|
|
24
24
|
from dara.core.visual.components.dynamic_component import (
|
|
25
25
|
DynamicComponent,
|
|
26
26
|
DynamicComponentDef,
|
|
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
|
|
|
15
15
|
limitations under the License.
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
from typing import ClassVar
|
|
18
|
+
from typing import ClassVar, Union
|
|
19
19
|
|
|
20
20
|
from dara.core.definitions import BaseFallback, JsComponentDef
|
|
21
21
|
|
|
@@ -47,7 +47,7 @@ class Fallback:
|
|
|
47
47
|
but will suspend and show a fallback UI after the given timeout if the new state is not ready.
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
|
-
py_component: ClassVar[str] = 'DefaultFallback'
|
|
50
|
+
py_component: ClassVar[Union[str, None]] = 'DefaultFallback'
|
|
51
51
|
|
|
52
52
|
class Row(BaseFallback):
|
|
53
53
|
"""
|
|
@@ -72,4 +72,4 @@ class Fallback:
|
|
|
72
72
|
but will suspend and show a fallback UI after the given timeout if the new state is not ready.
|
|
73
73
|
"""
|
|
74
74
|
|
|
75
|
-
py_component: ClassVar[str] = 'RowFallback'
|
|
75
|
+
py_component: ClassVar[Union[str, None]] = 'RowFallback'
|
dara/core/visual/css/__init__.py
CHANGED
|
@@ -18,7 +18,6 @@ limitations under the License.
|
|
|
18
18
|
# generated by datamodel-codegen:
|
|
19
19
|
# filename: css-schema.json
|
|
20
20
|
# timestamp: 2022-07-07T11:51:57+00:00
|
|
21
|
-
# pylint: disable=line-too-long
|
|
22
21
|
|
|
23
22
|
from __future__ import annotations
|
|
24
23
|
|
|
@@ -383,11 +382,11 @@ class CSSProperties(DaraBaseModel):
|
|
|
383
382
|
default=None,
|
|
384
383
|
description='The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules describing the animation or animations to apply to the element.\n\n**Syntax**: `[ none | <keyframes-name> ]#`\n\n**Initial value**: `none`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :-----: | :-----: | :-----: | :----: | :----: |\n| **43** | **16** | **9** | **12** | **10** |\n| 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | |',
|
|
385
384
|
)
|
|
386
|
-
animationPlayState: Literal[
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
385
|
+
animationPlayState: Literal['-moz-initial', 'inherit', 'initial', 'paused', 'revert', 'running', 'unset', None] = (
|
|
386
|
+
Field(
|
|
387
|
+
default=None,
|
|
388
|
+
description='The **`animation-play-state`** CSS property sets whether an animation is running or paused.\n\n**Syntax**: `<single-animation-play-state>#`\n\n**Initial value**: `running`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :-----: | :-----: | :-----: | :----: | :----: |\n| **43** | **16** | **9** | **12** | **10** |\n| 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | |',
|
|
389
|
+
)
|
|
391
390
|
)
|
|
392
391
|
animationTimingFunction: Literal[
|
|
393
392
|
'-moz-initial',
|
|
@@ -3507,11 +3506,11 @@ class CSSProperties(DaraBaseModel):
|
|
|
3507
3506
|
)
|
|
3508
3507
|
colorInterpolation: Optional[Property.ColorInterpolation] = None
|
|
3509
3508
|
colorRendering: Optional[Property.ColorRendering] = None
|
|
3510
|
-
colorScheme: Literal[
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3509
|
+
colorScheme: Literal['-moz-initial', 'dark', 'inherit', 'initial', 'light', 'normal', 'revert', 'unset', None] = (
|
|
3510
|
+
Field(
|
|
3511
|
+
default=None,
|
|
3512
|
+
description='The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in.\n\n**Syntax**: `normal | [ light | dark | <custom-ident> ]+`\n\n**Initial value**: `normal`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :----: | :-----: | :----: | :----: | :-: |\n| **81** | No | **13** | **81** | No |',
|
|
3513
|
+
)
|
|
3515
3514
|
)
|
|
3516
3515
|
columnCount: Literal['-moz-initial', 'auto', 'inherit', 'initial', 'revert', 'unset', None] = Field(
|
|
3517
3516
|
default=None,
|
|
@@ -4422,11 +4421,11 @@ class CSSProperties(DaraBaseModel):
|
|
|
4422
4421
|
default=None,
|
|
4423
4422
|
description='The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font.\n\n**Syntax**: `<font-stretch-absolute>`\n\n**Initial value**: `normal`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :----: | :-----: | :----: | :----: | :---: |\n| **60** | **9** | **11** | **12** | **9** |',
|
|
4424
4423
|
)
|
|
4425
|
-
fontStyle: Literal[
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4424
|
+
fontStyle: Literal['-moz-initial', 'inherit', 'initial', 'italic', 'normal', 'oblique', 'revert', 'unset', None] = (
|
|
4425
|
+
Field(
|
|
4426
|
+
default=None,
|
|
4427
|
+
description='The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`.\n\n**Syntax**: `normal | italic | oblique <angle>?`\n\n**Initial value**: `normal`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :----: | :-----: | :----: | :----: | :---: |\n| **1** | **1** | **1** | **12** | **4** |',
|
|
4428
|
+
)
|
|
4430
4429
|
)
|
|
4431
4430
|
fontSynthesis: Literal[
|
|
4432
4431
|
'-moz-initial', 'inherit', 'initial', 'none', 'revert', 'small-caps', 'style', 'unset', 'weight', None
|
|
@@ -4586,11 +4585,11 @@ class CSSProperties(DaraBaseModel):
|
|
|
4586
4585
|
default=None,
|
|
4587
4586
|
description='The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track or pattern of tracks.\n\n**Syntax**: `<track-size>+`\n\n**Initial value**: `auto`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :----: | :-----: | :------: | :----: | :-------------------------: |\n| **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-columns)_ |',
|
|
4588
4587
|
)
|
|
4589
|
-
gridAutoFlow: Literal[
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4588
|
+
gridAutoFlow: Literal['-moz-initial', 'column', 'dense', 'inherit', 'initial', 'revert', 'row', 'unset', None] = (
|
|
4589
|
+
Field(
|
|
4590
|
+
default=None,
|
|
4591
|
+
description='The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid.\n\n**Syntax**: `[ row | column ] || dense`\n\n**Initial value**: `row`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :----: | :-----: | :------: | :----: | :-: |\n| **57** | **52** | **10.1** | **16** | No |',
|
|
4592
|
+
)
|
|
4594
4593
|
)
|
|
4595
4594
|
gridAutoRows: Optional[Union[float_, str]] = Field(
|
|
4596
4595
|
default=None,
|
|
@@ -4662,11 +4661,11 @@ class CSSProperties(DaraBaseModel):
|
|
|
4662
4661
|
default=None,
|
|
4663
4662
|
description='The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate.\n\n**Syntax**: `none | manual | auto`\n\n**Initial value**: `manual`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :------: | :-----: | :-----------: | :----: | :----------: |\n| **55** | **43** | **5.1** _-x-_ | **79** | **10** _-x-_ |\n| 13 _-x-_ | 6 _-x-_ | | | |',
|
|
4664
4663
|
)
|
|
4665
|
-
imageOrientation: Literal[
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4664
|
+
imageOrientation: Literal['-moz-initial', 'flip', 'from-image', 'inherit', 'initial', 'revert', 'unset', None] = (
|
|
4665
|
+
Field(
|
|
4666
|
+
default=None,
|
|
4667
|
+
description='The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. It should _not_ be used for any other orientation adjustments; instead, the `transform` property should be used with the `rotate` `<transform-function>`.\n\n**Syntax**: `from-image | <angle> | [ <angle>? flip ]`\n\n**Initial value**: `from-image`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :----: | :-----: | :------: | :----: | :-: |\n| **81** | **26** | **13.1** | **81** | No |',
|
|
4668
|
+
)
|
|
4670
4669
|
)
|
|
4671
4670
|
imageRendering: Optional[Property.ImageRendering] = Field(
|
|
4672
4671
|
default=None,
|
|
@@ -5024,11 +5023,11 @@ class CSSProperties(DaraBaseModel):
|
|
|
5024
5023
|
default=None,
|
|
5025
5024
|
description='The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit.\n\n**Syntax**: `<length>`\n\n**Initial value**: `0`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :----: | :-----: | :----: | :--: | :-: |\n| n/a | No | No | n/a | No |',
|
|
5026
5025
|
)
|
|
5027
|
-
listStyle: Literal[
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5026
|
+
listStyle: Literal['-moz-initial', 'inherit', 'initial', 'inside', 'none', 'outside', 'revert', 'unset', None] = (
|
|
5027
|
+
Field(
|
|
5028
|
+
default=None,
|
|
5029
|
+
description="The **`list-style`** CSS shorthand property allows you set all the list style properties at once.\n\n**Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>`\n\n| Chrome | Firefox | Safari | Edge | IE |\n| :----: | :-----: | :----: | :----: | :---: |\n| **1** | **1** | **1** | **12** | **4** |",
|
|
5030
|
+
)
|
|
5032
5031
|
)
|
|
5033
5032
|
listStyleImage: Literal['-moz-initial', 'inherit', 'initial', 'none', 'revert', 'unset', None] = Field(
|
|
5034
5033
|
default=None,
|