dara-core 1.17.6__py3-none-any.whl → 1.18.1__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.
Files changed (68) hide show
  1. dara/core/__init__.py +2 -0
  2. dara/core/actions.py +1 -2
  3. dara/core/auth/basic.py +9 -9
  4. dara/core/auth/routes.py +5 -5
  5. dara/core/auth/utils.py +4 -4
  6. dara/core/base_definitions.py +15 -22
  7. dara/core/cli.py +8 -7
  8. dara/core/configuration.py +5 -2
  9. dara/core/css.py +1 -2
  10. dara/core/data_utils.py +2 -2
  11. dara/core/defaults.py +4 -7
  12. dara/core/definitions.py +6 -9
  13. dara/core/http.py +7 -3
  14. dara/core/interactivity/actions.py +28 -30
  15. dara/core/interactivity/any_data_variable.py +6 -5
  16. dara/core/interactivity/any_variable.py +4 -7
  17. dara/core/interactivity/data_variable.py +1 -1
  18. dara/core/interactivity/derived_data_variable.py +7 -6
  19. dara/core/interactivity/derived_variable.py +93 -33
  20. dara/core/interactivity/filtering.py +19 -27
  21. dara/core/interactivity/plain_variable.py +3 -2
  22. dara/core/interactivity/switch_variable.py +4 -4
  23. dara/core/internal/cache_store/base_impl.py +2 -1
  24. dara/core/internal/cache_store/cache_store.py +17 -5
  25. dara/core/internal/cache_store/keep_all.py +4 -1
  26. dara/core/internal/cache_store/lru.py +5 -1
  27. dara/core/internal/cache_store/ttl.py +4 -1
  28. dara/core/internal/cgroup.py +1 -1
  29. dara/core/internal/dependency_resolution.py +46 -10
  30. dara/core/internal/devtools.py +2 -2
  31. dara/core/internal/download.py +4 -3
  32. dara/core/internal/encoder_registry.py +7 -7
  33. dara/core/internal/execute_action.py +4 -10
  34. dara/core/internal/hashing.py +1 -3
  35. dara/core/internal/import_discovery.py +3 -4
  36. dara/core/internal/normalization.py +9 -13
  37. dara/core/internal/pandas_utils.py +3 -3
  38. dara/core/internal/pool/task_pool.py +16 -10
  39. dara/core/internal/pool/utils.py +5 -7
  40. dara/core/internal/pool/worker.py +3 -2
  41. dara/core/internal/port_utils.py +1 -1
  42. dara/core/internal/registries.py +9 -4
  43. dara/core/internal/registry.py +3 -1
  44. dara/core/internal/registry_lookup.py +7 -3
  45. dara/core/internal/routing.py +77 -44
  46. dara/core/internal/scheduler.py +13 -8
  47. dara/core/internal/settings.py +2 -2
  48. dara/core/internal/tasks.py +8 -14
  49. dara/core/internal/utils.py +11 -10
  50. dara/core/internal/websocket.py +18 -19
  51. dara/core/js_tooling/js_utils.py +23 -24
  52. dara/core/logging.py +3 -6
  53. dara/core/main.py +14 -11
  54. dara/core/metrics/cache.py +1 -1
  55. dara/core/metrics/utils.py +3 -3
  56. dara/core/persistence.py +1 -1
  57. dara/core/umd/dara.core.umd.js +146 -128
  58. dara/core/visual/components/__init__.py +2 -2
  59. dara/core/visual/components/fallback.py +3 -3
  60. dara/core/visual/css/__init__.py +30 -31
  61. dara/core/visual/dynamic_component.py +10 -11
  62. dara/core/visual/progress_updater.py +4 -3
  63. {dara_core-1.17.6.dist-info → dara_core-1.18.1.dist-info}/METADATA +11 -10
  64. dara_core-1.18.1.dist-info/RECORD +114 -0
  65. dara_core-1.17.6.dist-info/RECORD +0 -114
  66. {dara_core-1.17.6.dist-info → dara_core-1.18.1.dist-info}/LICENSE +0 -0
  67. {dara_core-1.17.6.dist-info → dara_core-1.18.1.dist-info}/WHEEL +0 -0
  68. {dara_core-1.17.6.dist-info → dara_core-1.18.1.dist-info}/entry_points.txt +0 -0
@@ -52950,13 +52950,107 @@ Inferred class string: "${iconClasses}."`
52950
52950
  atomRegistry.set(variable.uid, Recoil_index_8({ default: true, key: variable.uid }));
52951
52951
  }
52952
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
+ }
52953
53047
  function isTaskResponse$1(dvResponse) {
52954
53048
  return "task_id" in dvResponse;
52955
53049
  }
52956
53050
  async function fetchDerivedVariable({
52957
53051
  cache: cache2,
52958
- force,
52959
53052
  extras,
53053
+ force_key,
52960
53054
  variableUid,
52961
53055
  values,
52962
53056
  wsClient,
@@ -52969,7 +53063,7 @@ Inferred class string: "${iconClasses}."`
52969
53063
  const res = await request(
52970
53064
  `/api/core/derived-variable/${variableUid}`,
52971
53065
  {
52972
- body: JSON.stringify({ force, is_data_variable, values, ws_channel }),
53066
+ body: JSON.stringify({ is_data_variable, values, ws_channel, force_key: force_key != null ? force_key : null }),
52973
53067
  headers: { ...cacheControl },
52974
53068
  method: HTTP_METHOD.POST
52975
53069
  },
@@ -52986,9 +53080,9 @@ Inferred class string: "${iconClasses}."`
52986
53080
  selectorKey,
52987
53081
  values,
52988
53082
  wsClient,
52989
- force,
52990
53083
  extras,
52991
53084
  cache: cache2,
53085
+ force_key,
52992
53086
  is_data_variable = false
52993
53087
  }) {
52994
53088
  if (!debouncedFetchSubjects[selectorKey]) {
@@ -53003,7 +53097,7 @@ Inferred class string: "${iconClasses}."`
53003
53097
  debouncedFetchSubjects[selectorKey].next({
53004
53098
  cache: cache2,
53005
53099
  extras,
53006
- force,
53100
+ force_key,
53007
53101
  is_data_variable,
53008
53102
  selectorKey,
53009
53103
  values,
@@ -53061,8 +53155,9 @@ Inferred class string: "${iconClasses}."`
53061
53155
  function useTriggerIndex(variable) {
53062
53156
  return Recoil_index_20(getOrRegisterTrigger(variable));
53063
53157
  }
53064
- async function resolveDerivedValue(key, variables, deps, resolvedVariables, wsClient, get2, selfTrigger) {
53065
- const triggers = registerChildTriggers(variables, wsClient, get2);
53158
+ function resolveDerivedValue(key, variables, deps, resolvedVariables, wsClient, get2, selfTrigger) {
53159
+ const triggerList = buildTriggerList(variables);
53160
+ const triggers = registerChildTriggers(triggerList, wsClient, get2);
53066
53161
  if (selfTrigger) {
53067
53162
  triggers.unshift(selfTrigger);
53068
53163
  }
@@ -53074,9 +53169,6 @@ Inferred class string: "${iconClasses}."`
53074
53169
  }
53075
53170
  return acc.set(getUniqueIdentifier(v2), depsValues[idx]);
53076
53171
  }, /* @__PURE__ */ new Map());
53077
- let recalculateForced = false;
53078
- let wasTriggered = false;
53079
- let wasTriggeredItself = false;
53080
53172
  const previousEntry = depsRegistry.get(key);
53081
53173
  const relevantValues = deps.filter(isVariable).map((dep) => variableValueMap.get(getUniqueIdentifier(dep))).concat(triggers.map((trigger) => trigger.inc));
53082
53174
  if (previousEntry) {
@@ -53090,23 +53182,33 @@ Inferred class string: "${iconClasses}."`
53090
53182
  const previousTriggerCounters = previousEntry.args.slice(
53091
53183
  previousEntry.args.length - triggers.length
53092
53184
  );
53185
+ let selfTriggerForceKey = null;
53093
53186
  for (const [idx, triggerValue] of triggers.entries()) {
53094
53187
  if (triggerValue.inc !== previousTriggerCounters[idx]) {
53095
- recalculateForced = triggerValue.force;
53096
- if (idx === 0) {
53097
- wasTriggeredItself = true;
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
+ }
53098
53198
  }
53099
- wasTriggered = true;
53100
53199
  break;
53101
53200
  }
53102
53201
  }
53103
- }
53104
- if (wasTriggered && !wasTriggeredItself) {
53105
- await new Promise((resolve) => setTimeout(resolve, 50));
53202
+ return {
53203
+ relevantValues,
53204
+ selfTriggerForceKey,
53205
+ type: "current",
53206
+ values
53207
+ };
53106
53208
  }
53107
53209
  return {
53108
- force: recalculateForced,
53109
53210
  relevantValues,
53211
+ selfTriggerForceKey: null,
53110
53212
  type: "current",
53111
53213
  values
53112
53214
  };
@@ -53131,7 +53233,7 @@ Inferred class string: "${iconClasses}."`
53131
53233
  const selfTrigger = get2(getOrRegisterTrigger(variable));
53132
53234
  const { extras } = extrasSerializable;
53133
53235
  const selectorKey = key + extrasSerializable.toJSON();
53134
- const derivedResult = await resolveDerivedValue(
53236
+ const derivedResult = resolveDerivedValue(
53135
53237
  selectorKey,
53136
53238
  variable.variables,
53137
53239
  variable.deps,
@@ -53148,10 +53250,10 @@ Inferred class string: "${iconClasses}."`
53148
53250
  variableResponse = await debouncedFetchDerivedVariable({
53149
53251
  cache: variable.cache,
53150
53252
  extras,
53151
- force: derivedResult.force,
53253
+ force_key: derivedResult.selfTriggerForceKey,
53152
53254
  is_data_variable: isDerivedDataVariable(variable),
53153
53255
  selectorKey,
53154
- values: normalizeRequest(cleanArgs(derivedResult.values, false), variable.variables),
53256
+ values: normalizeRequest(cleanArgs(derivedResult.values), variable.variables),
53155
53257
  variableUid: variable.uid,
53156
53258
  wsClient
53157
53259
  });
@@ -53246,7 +53348,10 @@ Inferred class string: "${iconClasses}."`
53246
53348
  const triggerIndex = React.useMemo(() => getOrRegisterTrigger(variable), []);
53247
53349
  const triggerUpdates = Recoil_index_24(triggerIndex);
53248
53350
  const trigger = React.useCallback(
53249
- (force = true) => triggerUpdates((val) => ({ force, inc: val.inc + 1 })),
53351
+ (force = true) => triggerUpdates((val) => ({
53352
+ force_key: force ? nanoid() : null,
53353
+ inc: val.inc + 1
53354
+ })),
53250
53355
  [triggerUpdates]
53251
53356
  );
53252
53357
  useInterval(trigger, variable.polling_interval);
@@ -53289,87 +53394,6 @@ Inferred class string: "${iconClasses}."`
53289
53394
  cloned[key] = nested.length === 1 ? newValue : setNested(cloned[key], nested.slice(1), newValue);
53290
53395
  return cloned;
53291
53396
  }
53292
- function getOrRegisterTrigger(variable) {
53293
- const triggerKey = getRegistryKey(variable, "trigger");
53294
- if (!atomRegistry.has(triggerKey)) {
53295
- atomRegistry.set(
53296
- triggerKey,
53297
- Recoil_index_8({
53298
- default: {
53299
- force: false,
53300
- inc: 0
53301
- },
53302
- key: triggerKey
53303
- })
53304
- );
53305
- }
53306
- return atomRegistry.get(triggerKey);
53307
- }
53308
- function getOrRegisterDataVariableTrigger(variable, wsClient) {
53309
- const key = `${variable.uid}-data`;
53310
- if (!dataRegistry.has(key)) {
53311
- dataRegistry.set(
53312
- key,
53313
- Recoil_index_8({
53314
- default: {
53315
- force: true,
53316
- inc: 0
53317
- },
53318
- effects: [
53319
- ({ setSelf }) => {
53320
- const subscription = wsClient.serverTriggers$(variable.uid).subscribe(() => {
53321
- setSelf((v2) => {
53322
- if (typeof v2 === "object" && "inc" in v2) {
53323
- return {
53324
- force: true,
53325
- inc: v2.inc + 1
53326
- };
53327
- }
53328
- return {
53329
- force: true,
53330
- inc: 1
53331
- };
53332
- });
53333
- });
53334
- return () => {
53335
- subscription == null ? void 0 : subscription.unsubscribe();
53336
- };
53337
- }
53338
- ],
53339
- key
53340
- })
53341
- );
53342
- }
53343
- return dataRegistry.get(key);
53344
- }
53345
- function registerTriggers(variable, wsClient, registerFunc = Recoil_index_20) {
53346
- const triggers = [];
53347
- const triggerIndex = getOrRegisterTrigger(variable);
53348
- triggers.push(registerFunc(triggerIndex));
53349
- variable.variables.forEach((v2) => {
53350
- if (isDerivedVariable(v2) || isDerivedDataVariable(v2)) {
53351
- triggers.push(...registerTriggers(v2, wsClient, registerFunc));
53352
- }
53353
- if (isDataVariable(v2)) {
53354
- const serverTrigger = getOrRegisterDataVariableTrigger(v2, wsClient);
53355
- triggers.push(registerFunc(serverTrigger));
53356
- }
53357
- });
53358
- return triggers;
53359
- }
53360
- function registerChildTriggers(variables, wsClient, registerFunc = Recoil_index_20) {
53361
- const triggers = [];
53362
- variables.forEach((v2) => {
53363
- if (isDerivedVariable(v2) || isDerivedDataVariable(v2)) {
53364
- triggers.push(...registerTriggers(v2, wsClient, registerFunc));
53365
- }
53366
- if (isDataVariable(v2)) {
53367
- const serverTrigger = getOrRegisterDataVariableTrigger(v2, wsClient);
53368
- triggers.push(registerFunc(serverTrigger));
53369
- }
53370
- });
53371
- return triggers;
53372
- }
53373
53397
  function resolveVariable(variable, client, taskContext, extras, resolver = (val) => val) {
53374
53398
  if (isDerivedVariable(variable) || isDerivedDataVariable(variable)) {
53375
53399
  getOrRegisterDerivedVariable(variable, client, taskContext, extras);
@@ -53417,37 +53441,37 @@ Inferred class string: "${iconClasses}."`
53417
53441
  }
53418
53442
  return resolver(getOrRegisterPlainVariable(variable, client, taskContext, extras));
53419
53443
  }
53420
- function cleanValue(value, force) {
53444
+ function cleanValue(value, forceKeyOverride) {
53421
53445
  if (isResolvedDerivedVariable(value) || isResolvedDerivedDataVariable(value)) {
53422
53446
  const { deps, ...rest } = value;
53423
- const cleanedValues = value.values.map((v2) => cleanValue(v2, force));
53447
+ const cleanedValues = value.values.map((v2) => cleanValue(v2));
53424
53448
  return {
53425
53449
  ...rest,
53426
- force,
53450
+ force_key: forceKeyOverride != null ? forceKeyOverride : value.force_key || null,
53427
53451
  values: cleanedValues
53428
53452
  };
53429
53453
  }
53430
53454
  if (isResolvedSwitchVariable(value)) {
53431
53455
  return {
53432
53456
  ...value,
53433
- value: cleanValue(value.value, force),
53434
- value_map: cleanValue(value.value_map, force),
53435
- default: cleanValue(value.default, force)
53457
+ value: cleanValue(value.value, forceKeyOverride),
53458
+ value_map: cleanValue(value.value_map, forceKeyOverride),
53459
+ default: cleanValue(value.default, forceKeyOverride)
53436
53460
  };
53437
53461
  }
53438
53462
  return value;
53439
53463
  }
53440
- function cleanKwargs(kwargs, force) {
53464
+ function cleanKwargs(kwargs, forceKeyOverride) {
53441
53465
  return Object.keys(kwargs).reduce(
53442
53466
  (acc, k2) => {
53443
- acc[k2] = cleanValue(kwargs[k2], force);
53467
+ acc[k2] = cleanValue(kwargs[k2], forceKeyOverride);
53444
53468
  return acc;
53445
53469
  },
53446
53470
  {}
53447
53471
  );
53448
53472
  }
53449
- function cleanArgs(values, force) {
53450
- return values.map((val) => cleanValue(val, force));
53473
+ function cleanArgs(values, forceKeyOverride) {
53474
+ return values.map((val) => cleanValue(val, forceKeyOverride));
53451
53475
  }
53452
53476
  /*!
53453
53477
  * https://github.com/Starcounter-Jack/JSON-Patch
@@ -54707,7 +54731,7 @@ Inferred class string: "${iconClasses}."`
54707
54731
  execution_id: executionId,
54708
54732
  input,
54709
54733
  uid: annotatedAction.uid,
54710
- values: normalizeRequest(cleanKwargs(resolvedKwargs, false), annotatedAction.dynamic_kwargs),
54734
+ values: normalizeRequest(cleanKwargs(resolvedKwargs, null), annotatedAction.dynamic_kwargs),
54711
54735
  ws_channel
54712
54736
  }),
54713
54737
  method: HTTP_METHOD.POST
@@ -55047,10 +55071,10 @@ Inferred class string: "${iconClasses}."`
55047
55071
  return fetchDerivedVariable({
55048
55072
  cache: variable.cache,
55049
55073
  extras: ctx.extras,
55050
- force: false,
55074
+ force_key: null,
55051
55075
  selectorKey: resolved.uid,
55052
55076
  values: normalizeRequest(
55053
- cleanArgs(resolved.values, false),
55077
+ cleanArgs(resolved.values),
55054
55078
  variable.variables
55055
55079
  ),
55056
55080
  variableUid: resolved.uid,
@@ -55382,7 +55406,7 @@ Inferred class string: "${iconClasses}."`
55382
55406
  triggerKey,
55383
55407
  Recoil_index_8({
55384
55408
  default: {
55385
- force: false,
55409
+ force_key: null,
55386
55410
  inc: 0
55387
55411
  },
55388
55412
  key: triggerKey
@@ -55422,7 +55446,7 @@ Inferred class string: "${iconClasses}."`
55422
55446
  const triggerAtom = getOrRegisterComponentTrigger(uid2);
55423
55447
  const selfTrigger = get2(triggerAtom);
55424
55448
  const { extras } = extrasSerializable;
55425
- const derivedResult = await resolveDerivedValue(
55449
+ const derivedResult = resolveDerivedValue(
55426
55450
  key,
55427
55451
  kwargsList,
55428
55452
  kwargsList,
@@ -55441,8 +55465,7 @@ Inferred class string: "${iconClasses}."`
55441
55465
  return acc;
55442
55466
  },
55443
55467
  {}
55444
- ),
55445
- derivedResult.force
55468
+ )
55446
55469
  );
55447
55470
  let result = null;
55448
55471
  try {
@@ -55535,7 +55558,7 @@ Inferred class string: "${iconClasses}."`
55535
55558
  ({ set: set2 }) => () => {
55536
55559
  const triggerAtom = getOrRegisterComponentTrigger(uid2, loop_instance_uid);
55537
55560
  set2(triggerAtom, (triggerIndexValue) => ({
55538
- force: false,
55561
+ force_key: nanoid(),
55539
55562
  inc: triggerIndexValue.inc + 1
55540
55563
  }));
55541
55564
  },
@@ -55655,11 +55678,6 @@ Inferred class string: "${iconClasses}."`
55655
55678
  return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
55656
55679
  }
55657
55680
  var isPlainObject_1 = isPlainObject;
55658
- var baseSet = _baseSet;
55659
- function set(object2, path, value) {
55660
- return object2 == null ? object2 : baseSet(object2, path, value);
55661
- }
55662
- var set_1 = set;
55663
55681
  function createMarkers(scope, loopInstanceUid) {
55664
55682
  const markers = [];
55665
55683
  if (scope.action) {
@@ -56885,7 +56903,7 @@ Inferred class string: "${iconClasses}."`
56885
56903
  if (isDerivedVariable(variable) || isDerivedDataVariable(variable)) {
56886
56904
  const triggerAtom = getOrRegisterTrigger(variable);
56887
56905
  ctx.set(triggerAtom, (triggerIndexValue) => ({
56888
- force: true,
56906
+ force_key: nanoid(),
56889
56907
  inc: triggerIndexValue.inc + 1
56890
56908
  }));
56891
56909
  } else if (isUrlVariable(variable)) {
@@ -56906,8 +56924,8 @@ Inferred class string: "${iconClasses}."`
56906
56924
  const TriggerVariable = (ctx, actionImpl) => {
56907
56925
  const triggerAtom = getOrRegisterTrigger(actionImpl.variable);
56908
56926
  ctx.set(triggerAtom, (triggerIndexValue) => ({
56909
- force: actionImpl.force,
56910
- inc: triggerIndexValue.inc + 1
56927
+ inc: triggerIndexValue.inc + 1,
56928
+ force_key: actionImpl.force ? nanoid() : null
56911
56929
  }));
56912
56930
  };
56913
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'
@@ -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
- '-moz-initial', 'inherit', 'initial', 'paused', 'revert', 'running', 'unset', None
388
- ] = Field(
389
- default=None,
390
- 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-_ | | |',
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
- '-moz-initial', 'dark', 'inherit', 'initial', 'light', 'normal', 'revert', 'unset', None
3512
- ] = Field(
3513
- default=None,
3514
- 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 |',
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
- '-moz-initial', 'inherit', 'initial', 'italic', 'normal', 'oblique', 'revert', 'unset', None
4427
- ] = Field(
4428
- default=None,
4429
- 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** |',
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
- '-moz-initial', 'column', 'dense', 'inherit', 'initial', 'revert', 'row', 'unset', None
4591
- ] = Field(
4592
- default=None,
4593
- 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 |',
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
- '-moz-initial', 'flip', 'from-image', 'inherit', 'initial', 'revert', 'unset', None
4667
- ] = Field(
4668
- default=None,
4669
- 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 |',
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
- '-moz-initial', 'inherit', 'initial', 'inside', 'none', 'outside', 'revert', 'unset', None
5029
- ] = Field(
5030
- default=None,
5031
- 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** |",
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,