@umbraco-cms/backoffice 14.0.0--preview004-1a9a20fa → 14.0.0--preview004-73d11345

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 (67) hide show
  1. package/dist-cms/apps/app/server-connection.js +1 -1
  2. package/dist-cms/apps/backoffice/backoffice.context.js +2 -2
  3. package/dist-cms/apps/installer/installer.context.js +8 -8
  4. package/dist-cms/custom-elements.json +2 -2
  5. package/dist-cms/libs/extension-api/registry/extension.registry.js +5 -5
  6. package/dist-cms/libs/observable-api/states/array-state.d.ts +16 -2
  7. package/dist-cms/libs/observable-api/states/array-state.js +25 -11
  8. package/dist-cms/libs/observable-api/states/basic-state.d.ts +10 -6
  9. package/dist-cms/libs/observable-api/states/basic-state.js +12 -8
  10. package/dist-cms/libs/observable-api/states/class-state.d.ts +6 -1
  11. package/dist-cms/libs/observable-api/states/class-state.js +8 -3
  12. package/dist-cms/libs/observable-api/states/deep-state.d.ts +6 -1
  13. package/dist-cms/libs/observable-api/states/deep-state.js +7 -2
  14. package/dist-cms/libs/observable-api/states/object-state.js +1 -1
  15. package/dist-cms/packages/block/block/context/block.context.js +8 -8
  16. package/dist-cms/packages/block/block/manager/block-manager.context.js +5 -5
  17. package/dist-cms/packages/block/block/workspace/block-element-manager.js +1 -1
  18. package/dist-cms/packages/block/block/workspace/block-workspace.context.js +3 -3
  19. package/dist-cms/packages/block/block-type/workspace/block-type-workspace.context.js +3 -3
  20. package/dist-cms/packages/core/collection/collection-view.manager.js +4 -4
  21. package/dist-cms/packages/core/collection/default/collection-default.context.js +4 -4
  22. package/dist-cms/packages/core/components/input-markdown-editor/input-markdown.element.js +1 -1
  23. package/dist-cms/packages/core/content-type/content-type-container-structure-helper.class.js +5 -5
  24. package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.js +1 -1
  25. package/dist-cms/packages/core/content-type/content-type-structure-manager.class.js +3 -3
  26. package/dist-cms/packages/core/data-type/workspace/data-type-workspace.context.js +5 -5
  27. package/dist-cms/packages/core/menu/menu.context.js +1 -1
  28. package/dist-cms/packages/core/modal/common/code-editor/code-editor-modal.element.js +1 -1
  29. package/dist-cms/packages/core/modal/modal-manager.context.js +2 -2
  30. package/dist-cms/packages/core/notification/notification.context.js +2 -2
  31. package/dist-cms/packages/core/property/property/property.context.js +10 -10
  32. package/dist-cms/packages/core/property/property-dataset/property-dataset-base-context.js +2 -2
  33. package/dist-cms/packages/core/property-editor/uis/tree-picker/config/source-type-picker/property-editor-ui-tree-picker-source-type-picker.element.d.ts +2 -1
  34. package/dist-cms/packages/core/property-editor/uis/tree-picker/config/source-type-picker/property-editor-ui-tree-picker-source-type-picker.element.js +20 -7
  35. package/dist-cms/packages/core/repository/repository-items.manager.js +3 -3
  36. package/dist-cms/packages/core/section/section-sidebar/section-sidebar.context.js +8 -8
  37. package/dist-cms/packages/core/section/section.context.js +3 -3
  38. package/dist-cms/packages/core/temporary-file/temporary-file-manager.class.js +2 -2
  39. package/dist-cms/packages/core/themes/theme.context.js +1 -1
  40. package/dist-cms/packages/core/tree/tree-item-base/tree-item-base.context.js +11 -11
  41. package/dist-cms/packages/core/workspace/workspace-context/editable-workspace-context-base.js +1 -1
  42. package/dist-cms/packages/core/workspace/workspace-context/entity-manager-controller.js +2 -2
  43. package/dist-cms/packages/core/workspace/workspace-split-view/workspace-split-view.context.js +1 -1
  44. package/dist-cms/packages/dictionary/dictionary/workspace/dictionary-workspace.context.js +3 -3
  45. package/dist-cms/packages/documents/document-types/workspace/document-type-workspace.context.js +1 -1
  46. package/dist-cms/packages/documents/documents/property-dataset-context/document-property-dataset-context.js +1 -1
  47. package/dist-cms/packages/documents/documents/workspace/document-workspace.context.js +2 -2
  48. package/dist-cms/packages/log-viewer/workspace/logviewer.context.js +14 -14
  49. package/dist-cms/packages/media/media/workspace/media-workspace.context.js +2 -2
  50. package/dist-cms/packages/media/media-types/workspace/media-type-workspace.context.js +1 -1
  51. package/dist-cms/packages/members/member-types/workspace/member-type-workspace.context.js +2 -2
  52. package/dist-cms/packages/relations/relation-types/workspace/relation-type-workspace.context.js +1 -1
  53. package/dist-cms/packages/settings/languages/workspace/language/language-workspace.context.js +1 -1
  54. package/dist-cms/packages/templating/partial-views/workspace/partial-view-workspace.context.js +3 -3
  55. package/dist-cms/packages/templating/scripts/workspace/script-workspace.context.js +3 -3
  56. package/dist-cms/packages/templating/stylesheets/workspace/stylesheet-workspace.context.js +5 -5
  57. package/dist-cms/packages/templating/templates/workspace/template-workspace.context.js +5 -5
  58. package/dist-cms/packages/user/current-user/current-user-history.store.js +2 -2
  59. package/dist-cms/packages/user/current-user/current-user.context.js +1 -1
  60. package/dist-cms/packages/user/user-group/workspace/user-group-workspace.context.js +2 -2
  61. package/dist-cms/shared/auth/auth.context.js +2 -2
  62. package/dist-cms/shared/utils/pagination-manager/pagination.manager.js +5 -5
  63. package/dist-cms/shared/utils/selection-manager/selection.manager.js +6 -6
  64. package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
  65. package/dist-cms/vscode-html-custom-data.json +2 -3
  66. package/examples/workspace-context-counter/counter-workspace-context.ts +1 -1
  67. package/package.json +1 -1
@@ -62,6 +62,6 @@ _UmbServerConnection_url = new WeakMap(), _UmbServerConnection_status = new Weak
62
62
  if (error) {
63
63
  throw error;
64
64
  }
65
- __classPrivateFieldGet(this, _UmbServerConnection_isConnected, "f").next(true);
65
+ __classPrivateFieldGet(this, _UmbServerConnection_isConnected, "f").setValue(true);
66
66
  __classPrivateFieldSet(this, _UmbServerConnection_status, data?.serverStatus ?? RuntimeLevelModel.UNKNOWN, "f");
67
67
  };
@@ -18,11 +18,11 @@ export class UmbBackofficeContext extends UmbContextBase {
18
18
  _UmbBackofficeContext_allowedSections.set(this, new UmbBasicState([]));
19
19
  this.allowedSections = __classPrivateFieldGet(this, _UmbBackofficeContext_allowedSections, "f").asObservable();
20
20
  new UmbExtensionsManifestInitializer(this, umbExtensionsRegistry, 'section', null, (sections) => {
21
- __classPrivateFieldGet(this, _UmbBackofficeContext_allowedSections, "f").next([...sections]);
21
+ __classPrivateFieldGet(this, _UmbBackofficeContext_allowedSections, "f").setValue([...sections]);
22
22
  });
23
23
  }
24
24
  setActiveSectionAlias(alias) {
25
- __classPrivateFieldGet(this, _UmbBackofficeContext_activeSectionAlias, "f").next(alias);
25
+ __classPrivateFieldGet(this, _UmbBackofficeContext_activeSectionAlias, "f").setValue(alias);
26
26
  }
27
27
  }
28
28
  _UmbBackofficeContext_activeSectionAlias = new WeakMap(), _UmbBackofficeContext_allowedSections = new WeakMap();
@@ -47,7 +47,7 @@ export class UmbInstallerContext {
47
47
  * @memberof UmbInstallerContext
48
48
  */
49
49
  nextStep() {
50
- this._currentStep.next(this._currentStep.getValue() + 1);
50
+ this._currentStep.setValue(this._currentStep.getValue() + 1);
51
51
  }
52
52
  /**
53
53
  * Decrements the current step in the installation process
@@ -55,7 +55,7 @@ export class UmbInstallerContext {
55
55
  * @memberof UmbInstallerContext
56
56
  */
57
57
  prevStep() {
58
- this._currentStep.next(this._currentStep.getValue() - 1);
58
+ this._currentStep.setValue(this._currentStep.getValue() - 1);
59
59
  }
60
60
  /**
61
61
  * Reset the installation process
@@ -63,8 +63,8 @@ export class UmbInstallerContext {
63
63
  * @memberof UmbInstallerContext
64
64
  */
65
65
  reset() {
66
- this._installStatus.next(null);
67
- this._currentStep.next(1);
66
+ this._installStatus.setValue(null);
67
+ this._currentStep.setValue(1);
68
68
  }
69
69
  /**
70
70
  * Set the data for the installation process
@@ -73,7 +73,7 @@ export class UmbInstallerContext {
73
73
  * @memberof UmbInstallerContext
74
74
  */
75
75
  appendData(data) {
76
- this._data.next({ ...this.getData(), ...data });
76
+ this._data.setValue({ ...this.getData(), ...data });
77
77
  }
78
78
  /**
79
79
  * Get the data for the installation process
@@ -91,7 +91,7 @@ export class UmbInstallerContext {
91
91
  * @memberof UmbInstallerContext
92
92
  */
93
93
  setInstallStatus(status) {
94
- this._installStatus.next(status);
94
+ this._installStatus.setValue(status);
95
95
  }
96
96
  /**
97
97
  * Load installer settings from the API
@@ -101,10 +101,10 @@ export class UmbInstallerContext {
101
101
  async _loadInstallerSettings() {
102
102
  const { data, error } = await tryExecute(InstallResource.getInstallSettings());
103
103
  if (data) {
104
- this._settings.next(data);
104
+ this._settings.setValue(data);
105
105
  }
106
106
  else if (error) {
107
- this._installStatus.next(error);
107
+ this._installStatus.setValue(error);
108
108
  }
109
109
  }
110
110
  }
@@ -5054,14 +5054,14 @@
5054
5054
  "attributes": [
5055
5055
  {
5056
5056
  "name": "value",
5057
- "type": "string[] | undefined"
5057
+ "type": "string"
5058
5058
  }
5059
5059
  ],
5060
5060
  "properties": [
5061
5061
  {
5062
5062
  "name": "value",
5063
5063
  "attribute": "value",
5064
- "type": "string[] | undefined"
5064
+ "type": "string"
5065
5065
  },
5066
5066
  {
5067
5067
  "name": "styles",
@@ -66,18 +66,18 @@ export class UmbExtensionRegistry {
66
66
  .filter((k) => !(k.matchType === kind.matchType &&
67
67
  k.matchKind === kind.matchKind));
68
68
  nextData.push(kind);
69
- this._kinds.next(nextData);
69
+ this._kinds.setValue(nextData);
70
70
  }
71
71
  register(manifest) {
72
72
  const isValid = this.checkExtension(manifest);
73
73
  if (!isValid) {
74
74
  return;
75
75
  }
76
- this._extensions.next([...this._extensions.getValue(), manifest]);
76
+ this._extensions.setValue([...this._extensions.getValue(), manifest]);
77
77
  }
78
78
  registerMany(manifests) {
79
79
  const validManifests = manifests.filter(this.checkExtension.bind(this));
80
- this._extensions.next([...this._extensions.getValue(), ...validManifests]);
80
+ this._extensions.setValue([...this._extensions.getValue(), ...validManifests]);
81
81
  }
82
82
  unregisterMany(aliases) {
83
83
  aliases.forEach((alias) => this.unregister(alias));
@@ -85,8 +85,8 @@ export class UmbExtensionRegistry {
85
85
  unregister(alias) {
86
86
  const newKindsValues = this._kinds.getValue().filter((kind) => kind.alias !== alias);
87
87
  const newExtensionsValues = this._extensions.getValue().filter((extension) => extension.alias !== alias);
88
- this._kinds.next(newKindsValues);
89
- this._extensions.next(newExtensionsValues);
88
+ this._kinds.setValue(newKindsValues);
89
+ this._extensions.setValue(newExtensionsValues);
90
90
  }
91
91
  isRegistered(alias) {
92
92
  if (this._extensions.getValue().find((ext) => ext.alias === alias)) {
@@ -14,7 +14,7 @@ export declare class UmbArrayState<T> extends UmbDeepState<T[]> {
14
14
  constructor(initialData: T[], getUniqueOfEntryMethod: (entry: T) => unknown);
15
15
  /**
16
16
  * @method sortBy
17
- * @param {(a: T, b: T) => number} sortMethod - A method to be used for sorting everytime data is set.
17
+ * @param {(a: T, b: T) => number} sortMethod - A method to be used for sorting every time data is set.
18
18
  * @description - A sort method to this Subject.
19
19
  * @example <caption>Example add sort method</caption>
20
20
  * const data = [
@@ -25,7 +25,21 @@ export declare class UmbArrayState<T> extends UmbDeepState<T[]> {
25
25
  * myState.sortBy((a, b) => (a.sortOrder || 0) - (b.sortOrder || 0));
26
26
  */
27
27
  sortBy(sortMethod?: (a: T, b: T) => number): this;
28
- next(value: T[]): void;
28
+ /**
29
+ * @method setValue
30
+ * @param {T} data - The next data for this state to hold.
31
+ * @description - Set the data of this state, if sortBy has been defined for this state the data will be sorted before set. If data is different than current this will trigger observations to update.
32
+ * @example <caption>Example change the data of a state</caption>
33
+ * const myState = new UmbArrayState('Good morning');
34
+ * // myState.value is equal 'Good morning'.
35
+ * myState.setValue('Goodnight')
36
+ * // myState.value is equal 'Goodnight'.
37
+ */
38
+ setValue(value: T[]): void;
39
+ /**
40
+ * @deprecated - Use `setValue` instead.
41
+ */
42
+ next: (value: T[]) => void;
29
43
  /**
30
44
  * @method remove
31
45
  * @param {unknown[]} uniques - The unique values to remove.
@@ -26,11 +26,15 @@ export class UmbArrayState extends UmbDeepState {
26
26
  constructor(initialData, getUniqueOfEntryMethod) {
27
27
  super(initialData);
28
28
  _UmbArrayState_sortMethod.set(this, void 0);
29
+ /**
30
+ * @deprecated - Use `setValue` instead.
31
+ */
32
+ this.next = this.setValue;
29
33
  this.getUniqueMethod = getUniqueOfEntryMethod;
30
34
  }
31
35
  /**
32
36
  * @method sortBy
33
- * @param {(a: T, b: T) => number} sortMethod - A method to be used for sorting everytime data is set.
37
+ * @param {(a: T, b: T) => number} sortMethod - A method to be used for sorting every time data is set.
34
38
  * @description - A sort method to this Subject.
35
39
  * @example <caption>Example add sort method</caption>
36
40
  * const data = [
@@ -44,12 +48,22 @@ export class UmbArrayState extends UmbDeepState {
44
48
  __classPrivateFieldSet(this, _UmbArrayState_sortMethod, sortMethod, "f");
45
49
  return this;
46
50
  }
47
- next(value) {
51
+ /**
52
+ * @method setValue
53
+ * @param {T} data - The next data for this state to hold.
54
+ * @description - Set the data of this state, if sortBy has been defined for this state the data will be sorted before set. If data is different than current this will trigger observations to update.
55
+ * @example <caption>Example change the data of a state</caption>
56
+ * const myState = new UmbArrayState('Good morning');
57
+ * // myState.value is equal 'Good morning'.
58
+ * myState.setValue('Goodnight')
59
+ * // myState.value is equal 'Goodnight'.
60
+ */
61
+ setValue(value) {
48
62
  if (__classPrivateFieldGet(this, _UmbArrayState_sortMethod, "f")) {
49
- super.next(value.sort(__classPrivateFieldGet(this, _UmbArrayState_sortMethod, "f")));
63
+ super.setValue(value.sort(__classPrivateFieldGet(this, _UmbArrayState_sortMethod, "f")));
50
64
  }
51
65
  else {
52
- super.next(value);
66
+ super.setValue(value);
53
67
  }
54
68
  }
55
69
  /**
@@ -75,7 +89,7 @@ export class UmbArrayState extends UmbDeepState {
75
89
  return this.getUniqueMethod(x) !== unique;
76
90
  });
77
91
  });
78
- this.next(next);
92
+ this.setValue(next);
79
93
  }
80
94
  return this;
81
95
  }
@@ -100,7 +114,7 @@ export class UmbArrayState extends UmbDeepState {
100
114
  // @ts-ignore
101
115
  return this.getUniqueMethod(x) !== unique;
102
116
  });
103
- this.next(next);
117
+ this.setValue(next);
104
118
  }
105
119
  return this;
106
120
  }
@@ -126,7 +140,7 @@ export class UmbArrayState extends UmbDeepState {
126
140
  *
127
141
  */
128
142
  filter(predicate) {
129
- this.next(this.getValue().filter(predicate));
143
+ this.setValue(this.getValue().filter(predicate));
130
144
  return this;
131
145
  }
132
146
  /**
@@ -150,7 +164,7 @@ export class UmbArrayState extends UmbDeepState {
150
164
  else {
151
165
  next.push(entry);
152
166
  }
153
- this.next(next);
167
+ this.setValue(next);
154
168
  return this;
155
169
  }
156
170
  /**
@@ -175,10 +189,10 @@ export class UmbArrayState extends UmbDeepState {
175
189
  entries.forEach((entry) => {
176
190
  pushToUniqueArray(next, entry, this.getUniqueMethod);
177
191
  });
178
- this.next(next);
192
+ this.setValue(next);
179
193
  }
180
194
  else {
181
- this.next([...this.getValue(), ...entries]);
195
+ this.setValue([...this.getValue(), ...entries]);
182
196
  }
183
197
  return this;
184
198
  }
@@ -200,7 +214,7 @@ export class UmbArrayState extends UmbDeepState {
200
214
  if (!this.getUniqueMethod) {
201
215
  throw new Error("Can't partial update an ArrayState without a getUnique method provided when constructed.");
202
216
  }
203
- this.next(partialUpdateFrozenArray(this.getValue(), entry, (x) => unique === this.getUniqueMethod(x)));
217
+ this.setValue(partialUpdateFrozenArray(this.getValue(), entry, (x) => unique === this.getUniqueMethod(x)));
204
218
  return this;
205
219
  }
206
220
  }
@@ -22,7 +22,7 @@ export declare class UmbBasicState<T> {
22
22
  * @description - Holds the current data of this state.
23
23
  * @example <caption>Example retrieve the current data of a state</caption>
24
24
  * const myState = new UmbArrayState('Hello world');
25
- * console.log("Value is: ", myState.getValue());
25
+ * console.log("Value is: ", myState.value);
26
26
  */
27
27
  get value(): BehaviorSubject<T>['value'];
28
28
  /**
@@ -40,14 +40,18 @@ export declare class UmbBasicState<T> {
40
40
  */
41
41
  destroy(): void;
42
42
  /**
43
- * @method next
44
- * @param {T} data - The next set of data for this state to hold.
43
+ * @method setValue
44
+ * @param {T} data - The next data for this state to hold.
45
45
  * @description - Set the data of this state, if data is different than current this will trigger observations to update.
46
- * @example <caption>Example retrieve the current data of a state</caption>
46
+ * @example <caption>Example change the data of a state</caption>
47
47
  * const myState = new UmbArrayState('Good morning');
48
48
  * // myState.value is equal 'Good morning'.
49
- * myState.next('Goodnight')
49
+ * myState.setValue('Goodnight')
50
50
  * // myState.value is equal 'Goodnight'.
51
51
  */
52
- next(newData: T): void;
52
+ setValue(data: T): void;
53
+ /**
54
+ * @deprecated - Use `setValue` instead.
55
+ */
56
+ next: (data: T) => void;
53
57
  }
@@ -6,6 +6,10 @@ import { BehaviorSubject } from '../../../external/rxjs/index.js';
6
6
  */
7
7
  export class UmbBasicState {
8
8
  constructor(initialData) {
9
+ /**
10
+ * @deprecated - Use `setValue` instead.
11
+ */
12
+ this.next = this.setValue;
9
13
  this._subject = new BehaviorSubject(initialData);
10
14
  }
11
15
  /**
@@ -25,7 +29,7 @@ export class UmbBasicState {
25
29
  * @description - Holds the current data of this state.
26
30
  * @example <caption>Example retrieve the current data of a state</caption>
27
31
  * const myState = new UmbArrayState('Hello world');
28
- * console.log("Value is: ", myState.getValue());
32
+ * console.log("Value is: ", myState.value);
29
33
  */
30
34
  get value() {
31
35
  return this._subject.value;
@@ -49,18 +53,18 @@ export class UmbBasicState {
49
53
  this._subject.complete();
50
54
  }
51
55
  /**
52
- * @method next
53
- * @param {T} data - The next set of data for this state to hold.
56
+ * @method setValue
57
+ * @param {T} data - The next data for this state to hold.
54
58
  * @description - Set the data of this state, if data is different than current this will trigger observations to update.
55
- * @example <caption>Example retrieve the current data of a state</caption>
59
+ * @example <caption>Example change the data of a state</caption>
56
60
  * const myState = new UmbArrayState('Good morning');
57
61
  * // myState.value is equal 'Good morning'.
58
- * myState.next('Goodnight')
62
+ * myState.setValue('Goodnight')
59
63
  * // myState.value is equal 'Goodnight'.
60
64
  */
61
- next(newData) {
62
- if (newData !== this._subject.getValue()) {
63
- this._subject.next(newData);
65
+ setValue(data) {
66
+ if (data !== this._subject.getValue()) {
67
+ this._subject.next(data);
64
68
  }
65
69
  }
66
70
  }
@@ -10,5 +10,10 @@ export interface UmbClassStateData {
10
10
  */
11
11
  export declare class UmbClassState<T extends UmbClassStateData | undefined> extends UmbBasicState<T> {
12
12
  constructor(initialData: T);
13
- next(newData: T): void;
13
+ /**
14
+ * @method setValue
15
+ * @param {T} data - The next data for this state to hold.
16
+ * @description - Set the data of this state, if data is different than current this will trigger observations to update.
17
+ */
18
+ setValue(data: T): void;
14
19
  }
@@ -9,10 +9,15 @@ export class UmbClassState extends UmbBasicState {
9
9
  constructor(initialData) {
10
10
  super(initialData);
11
11
  }
12
- next(newData) {
12
+ /**
13
+ * @method setValue
14
+ * @param {T} data - The next data for this state to hold.
15
+ * @description - Set the data of this state, if data is different than current this will trigger observations to update.
16
+ */
17
+ setValue(data) {
13
18
  const oldValue = this._subject.getValue();
14
- if (newData && oldValue?.equal(newData))
19
+ if (data && oldValue?.equal(data))
15
20
  return;
16
- this._subject.next(newData);
21
+ this._subject.next(data);
17
22
  }
18
23
  }
@@ -11,5 +11,10 @@ import { UmbBasicState } from './basic-state.js';
11
11
  export declare class UmbDeepState<T> extends UmbBasicState<T> {
12
12
  constructor(initialData: T);
13
13
  asObservablePart<ReturnType>(mappingFunction: MappingFunction<T, ReturnType>, memoizationFunction?: MemoizationFunction<ReturnType>): import("rxjs").Observable<ReturnType>;
14
- next(newData: T): void;
14
+ /**
15
+ * @method setValue
16
+ * @param {T} data - The next data for this state to hold.
17
+ * @description - Set the data of this state, if data is different than current this will trigger observations to update.
18
+ */
19
+ setValue(data: T): void;
15
20
  }
@@ -16,8 +16,13 @@ export class UmbDeepState extends UmbBasicState {
16
16
  asObservablePart(mappingFunction, memoizationFunction) {
17
17
  return createObservablePart(this._subject, mappingFunction, memoizationFunction);
18
18
  }
19
- next(newData) {
20
- const frozenData = deepFreeze(newData);
19
+ /**
20
+ * @method setValue
21
+ * @param {T} data - The next data for this state to hold.
22
+ * @description - Set the data of this state, if data is different than current this will trigger observations to update.
23
+ */
24
+ setValue(data) {
25
+ const frozenData = deepFreeze(data);
21
26
  // Only update data if its different than current data.
22
27
  if (!naiveObjectComparison(frozenData, this._subject.getValue())) {
23
28
  this._subject.next(frozenData);
@@ -20,7 +20,7 @@ export class UmbObjectState extends UmbDeepState {
20
20
  * myState.update({value: 'myNewValue'});
21
21
  */
22
22
  update(partialData) {
23
- this.next({ ...this._subject.getValue(), ...partialData });
23
+ this.setValue({ ...this._subject.getValue(), ...partialData });
24
24
  return this;
25
25
  }
26
26
  }
@@ -22,7 +22,7 @@ export class UmbBlockContext extends UmbContextBase {
22
22
  * @returns {void}
23
23
  */
24
24
  setLayout(layout) {
25
- __classPrivateFieldGet(this, _UmbBlockContext_layout, "f").next(layout);
25
+ __classPrivateFieldGet(this, _UmbBlockContext_layout, "f").setValue(layout);
26
26
  }
27
27
  constructor(host) {
28
28
  super(host, UMB_BLOCK_CONTEXT);
@@ -51,7 +51,7 @@ export class UmbBlockContext extends UmbContextBase {
51
51
  this.consumeContext(UMB_BLOCK_MANAGER_CONTEXT, (manager) => {
52
52
  __classPrivateFieldSet(this, _UmbBlockContext_manager, manager, "f");
53
53
  this.observe(manager.workspacePath, (workspacePath) => {
54
- __classPrivateFieldGet(this, _UmbBlockContext_workspacePath, "f").next(workspacePath);
54
+ __classPrivateFieldGet(this, _UmbBlockContext_workspacePath, "f").setValue(workspacePath);
55
55
  }, 'observeWorkspacePath');
56
56
  __classPrivateFieldGet(this, _UmbBlockContext_instances, "m", _UmbBlockContext_observeBlockType).call(this);
57
57
  __classPrivateFieldGet(this, _UmbBlockContext_instances, "m", _UmbBlockContext_observeData).call(this);
@@ -94,13 +94,13 @@ _UmbBlockContext_manager = new WeakMap(), _UmbBlockContext_blockTypeName = new W
94
94
  return;
95
95
  // observe content:
96
96
  this.observe(__classPrivateFieldGet(this, _UmbBlockContext_manager, "f").contentOf(contentUdi), (content) => {
97
- __classPrivateFieldGet(this, _UmbBlockContext_content, "f").next(content);
97
+ __classPrivateFieldGet(this, _UmbBlockContext_content, "f").setValue(content);
98
98
  }, 'observeContent');
99
99
  // observe settings:
100
100
  const settingsUdi = __classPrivateFieldGet(this, _UmbBlockContext_layout, "f").value?.settingsUdi;
101
101
  if (settingsUdi) {
102
102
  this.observe(__classPrivateFieldGet(this, _UmbBlockContext_manager, "f").contentOf(settingsUdi), (content) => {
103
- __classPrivateFieldGet(this, _UmbBlockContext_settings, "f").next(content);
103
+ __classPrivateFieldGet(this, _UmbBlockContext_settings, "f").setValue(content);
104
104
  }, 'observeSettings');
105
105
  }
106
106
  }, _UmbBlockContext_observeBlockType = function _UmbBlockContext_observeBlockType() {
@@ -111,7 +111,7 @@ _UmbBlockContext_manager = new WeakMap(), _UmbBlockContext_blockTypeName = new W
111
111
  return;
112
112
  // observe blockType:
113
113
  this.observe(__classPrivateFieldGet(this, _UmbBlockContext_manager, "f").blockTypeOf(contentTypeKey), (blockType) => {
114
- __classPrivateFieldGet(this, _UmbBlockContext_blockType, "f").next(blockType);
114
+ __classPrivateFieldGet(this, _UmbBlockContext_blockType, "f").setValue(blockType);
115
115
  }, 'observeBlockType');
116
116
  }, _UmbBlockContext_observeBlockTypeLabel = function _UmbBlockContext_observeBlockTypeLabel() {
117
117
  if (!__classPrivateFieldGet(this, _UmbBlockContext_manager, "f"))
@@ -122,14 +122,14 @@ _UmbBlockContext_manager = new WeakMap(), _UmbBlockContext_blockTypeName = new W
122
122
  if (blockType.label) {
123
123
  this.removeControllerByAlias('observeContentTypeName');
124
124
  // Missing part for label syntax, as we need to store the syntax, interpretive it and then set the label: (here we are just parsing the label syntax)
125
- __classPrivateFieldGet(this, _UmbBlockContext_label, "f").next(blockType.label);
125
+ __classPrivateFieldGet(this, _UmbBlockContext_label, "f").setValue(blockType.label);
126
126
  return;
127
127
  }
128
128
  else {
129
129
  // TODO: Maybe this could be skipped if we had a fallback label which was set to get the content element type name?
130
130
  // Get the name of the content element type for label:
131
131
  this.observe(this.blockTypeName, (contentTypeName) => {
132
- __classPrivateFieldGet(this, _UmbBlockContext_label, "f").next(contentTypeName ?? 'no name');
132
+ __classPrivateFieldGet(this, _UmbBlockContext_label, "f").setValue(contentTypeName ?? 'no name');
133
133
  }, 'observeBlockTypeName');
134
134
  }
135
135
  }, _UmbBlockContext_observeBlockTypeContentElementName = function _UmbBlockContext_observeBlockTypeContentElementName() {
@@ -140,7 +140,7 @@ _UmbBlockContext_manager = new WeakMap(), _UmbBlockContext_blockTypeName = new W
140
140
  return;
141
141
  // observe blockType:
142
142
  this.observe(__classPrivateFieldGet(this, _UmbBlockContext_manager, "f").contentTypeNameOf(contentElementTypeKey), (contentTypeName) => {
143
- __classPrivateFieldGet(this, _UmbBlockContext_blockTypeName, "f").next(contentTypeName);
143
+ __classPrivateFieldGet(this, _UmbBlockContext_blockTypeName, "f").setValue(contentTypeName);
144
144
  }, 'observeBlockTypeContentElementTypeName');
145
145
  };
146
146
  export const UMB_BLOCK_CONTEXT = new UmbContextToken('UmbBlockContext');
@@ -12,19 +12,19 @@ import { getKeyFromUdi } from '../../../../shared/utils/index.js';
12
12
  import { UMB_WORKSPACE_MODAL, UmbModalRouteRegistrationController } from '../../../core/modal/index.js';
13
13
  export class UmbBlockManagerContext extends UmbContextBase {
14
14
  setBlockTypes(blockTypes) {
15
- __classPrivateFieldGet(this, _UmbBlockManagerContext_blockTypes, "f").next(blockTypes);
15
+ __classPrivateFieldGet(this, _UmbBlockManagerContext_blockTypes, "f").setValue(blockTypes);
16
16
  }
17
17
  getBlockTypes() {
18
18
  return __classPrivateFieldGet(this, _UmbBlockManagerContext_blockTypes, "f").value;
19
19
  }
20
20
  setLayouts(layouts) {
21
- __classPrivateFieldGet(this, _UmbBlockManagerContext_layouts, "f").next(layouts);
21
+ __classPrivateFieldGet(this, _UmbBlockManagerContext_layouts, "f").setValue(layouts);
22
22
  }
23
23
  setContents(contents) {
24
- __classPrivateFieldGet(this, _UmbBlockManagerContext_contents, "f").next(contents);
24
+ __classPrivateFieldGet(this, _UmbBlockManagerContext_contents, "f").setValue(contents);
25
25
  }
26
26
  setSettings(settings) {
27
- __classPrivateFieldGet(this, _UmbBlockManagerContext_settings, "f").next(settings);
27
+ __classPrivateFieldGet(this, _UmbBlockManagerContext_settings, "f").setValue(settings);
28
28
  }
29
29
  constructor(host) {
30
30
  super(host, UMB_BLOCK_MANAGER_CONTEXT);
@@ -52,7 +52,7 @@ export class UmbBlockManagerContext extends UmbContextBase {
52
52
  })
53
53
  .observeRouteBuilder((routeBuilder) => {
54
54
  const newPath = routeBuilder({});
55
- __classPrivateFieldGet(this, _UmbBlockManagerContext_workspacePath, "f").next(newPath);
55
+ __classPrivateFieldGet(this, _UmbBlockManagerContext_workspacePath, "f").setValue(newPath);
56
56
  });
57
57
  }
58
58
  async ensureContentType(id) {
@@ -31,7 +31,7 @@ export class UmbBlockElementManager extends UmbBaseController {
31
31
  this.observe(this.contentTypeId, (id) => this.structure.loadType(id));
32
32
  }
33
33
  setData(data) {
34
- __classPrivateFieldGet(this, _UmbBlockElementManager_data, "f").next(data);
34
+ __classPrivateFieldGet(this, _UmbBlockElementManager_data, "f").setValue(data);
35
35
  __classPrivateFieldGet(this, _UmbBlockElementManager_getDataResolver, "f").call(this);
36
36
  }
37
37
  getData() {
@@ -42,7 +42,7 @@ export class UmbBlockWorkspaceContext extends UmbEditableWorkspaceContextBase {
42
42
  this.consumeContext(UMB_BLOCK_MANAGER_CONTEXT, (context) => {
43
43
  __classPrivateFieldSet(this, _UmbBlockWorkspaceContext_blockManager, context, "f");
44
44
  this.observe(context.layoutOf(unique), (layoutData) => {
45
- __classPrivateFieldGet(this, _UmbBlockWorkspaceContext_layout, "f").next(layoutData);
45
+ __classPrivateFieldGet(this, _UmbBlockWorkspaceContext_layout, "f").setValue(layoutData);
46
46
  //
47
47
  // Content:
48
48
  const contentUdi = layoutData?.contentUdi;
@@ -76,13 +76,13 @@ export class UmbBlockWorkspaceContext extends UmbEditableWorkspaceContextBase {
76
76
  this.content.setData(content);
77
77
  // TODO: If we have Settings dedicated to this block type, we initiate them here:
78
78
  this.setIsNew(true);
79
- __classPrivateFieldGet(this, _UmbBlockWorkspaceContext_layout, "f").next(layout);
79
+ __classPrivateFieldGet(this, _UmbBlockWorkspaceContext_layout, "f").setValue(layout);
80
80
  }
81
81
  getIsNew() {
82
82
  return __classPrivateFieldGet(this, _UmbBlockWorkspaceContext_isNew, "f").value;
83
83
  }
84
84
  setIsNew(value) {
85
- __classPrivateFieldGet(this, _UmbBlockWorkspaceContext_isNew, "f").next(value);
85
+ __classPrivateFieldGet(this, _UmbBlockWorkspaceContext_isNew, "f").setValue(value);
86
86
  }
87
87
  getData() {
88
88
  return __classPrivateFieldGet(this, _UmbBlockWorkspaceContext_layout, "f").getValue();
@@ -39,12 +39,12 @@ export class UmbBlockTypeWorkspaceContext extends UmbEditableWorkspaceContextBas
39
39
  if (value) {
40
40
  const blockTypeData = value.find((x) => x.contentElementTypeKey === unique);
41
41
  if (blockTypeData) {
42
- __classPrivateFieldGet(this, _UmbBlockTypeWorkspaceContext_data, "f").next(blockTypeData);
42
+ __classPrivateFieldGet(this, _UmbBlockTypeWorkspaceContext_data, "f").setValue(blockTypeData);
43
43
  return;
44
44
  }
45
45
  }
46
46
  // Fallback to undefined:
47
- __classPrivateFieldGet(this, _UmbBlockTypeWorkspaceContext_data, "f").next(undefined);
47
+ __classPrivateFieldGet(this, _UmbBlockTypeWorkspaceContext_data, "f").setValue(undefined);
48
48
  });
49
49
  });
50
50
  }
@@ -53,7 +53,7 @@ export class UmbBlockTypeWorkspaceContext extends UmbEditableWorkspaceContextBas
53
53
  contentElementTypeKey: contentElementTypeId,
54
54
  };
55
55
  this.setIsNew(true);
56
- __classPrivateFieldGet(this, _UmbBlockTypeWorkspaceContext_data, "f").next(data);
56
+ __classPrivateFieldGet(this, _UmbBlockTypeWorkspaceContext_data, "f").setValue(data);
57
57
  return { data };
58
58
  }
59
59
  getData() {
@@ -32,7 +32,7 @@ export class UmbCollectionViewManager extends UmbBaseController {
32
32
  // TODO: hack - we need to figure out how to get the "parent path" from the router
33
33
  setTimeout(() => {
34
34
  const currentUrl = new URL(window.location.href);
35
- __classPrivateFieldGet(this, _UmbCollectionViewManager_rootPathname, "f").next(currentUrl.pathname.substring(0, currentUrl.pathname.lastIndexOf('/')));
35
+ __classPrivateFieldGet(this, _UmbCollectionViewManager_rootPathname, "f").setValue(currentUrl.pathname.substring(0, currentUrl.pathname.lastIndexOf('/')));
36
36
  }, 100);
37
37
  }
38
38
  // Views
@@ -42,7 +42,7 @@ export class UmbCollectionViewManager extends UmbBaseController {
42
42
  * @memberof UmbCollectionContext
43
43
  */
44
44
  setCurrentView(view) {
45
- __classPrivateFieldGet(this, _UmbCollectionViewManager_currentView, "f").next(view);
45
+ __classPrivateFieldGet(this, _UmbCollectionViewManager_currentView, "f").setValue(view);
46
46
  }
47
47
  /**
48
48
  * Returns the current view.
@@ -56,7 +56,7 @@ export class UmbCollectionViewManager extends UmbBaseController {
56
56
  _UmbCollectionViewManager_views = new WeakMap(), _UmbCollectionViewManager_currentView = new WeakMap(), _UmbCollectionViewManager_routes = new WeakMap(), _UmbCollectionViewManager_rootPathname = new WeakMap(), _UmbCollectionViewManager_defaultViewAlias = new WeakMap(), _UmbCollectionViewManager_instances = new WeakSet(), _UmbCollectionViewManager_observeViews = function _UmbCollectionViewManager_observeViews() {
57
57
  return new UmbExtensionsManifestInitializer(this, umbExtensionsRegistry, 'collectionView', null, (views) => {
58
58
  const manifests = views.map((view) => view.manifest);
59
- __classPrivateFieldGet(this, _UmbCollectionViewManager_views, "f").next(manifests);
59
+ __classPrivateFieldGet(this, _UmbCollectionViewManager_views, "f").setValue(manifests);
60
60
  __classPrivateFieldGet(this, _UmbCollectionViewManager_instances, "m", _UmbCollectionViewManager_createRoutes).call(this, manifests);
61
61
  });
62
62
  }, _UmbCollectionViewManager_createRoutes = function _UmbCollectionViewManager_createRoutes(views) {
@@ -79,5 +79,5 @@ _UmbCollectionViewManager_views = new WeakMap(), _UmbCollectionViewManager_curre
79
79
  redirectTo: fallbackView,
80
80
  });
81
81
  }
82
- __classPrivateFieldGet(this, _UmbCollectionViewManager_routes, "f").next(routes);
82
+ __classPrivateFieldGet(this, _UmbCollectionViewManager_routes, "f").setValue(routes);
83
83
  };
@@ -79,8 +79,8 @@ export class UmbDefaultCollectionContext extends UmbContextBase {
79
79
  const filter = __classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").getValue();
80
80
  const { data } = await this.repository.requestCollection(filter);
81
81
  if (data) {
82
- __classPrivateFieldGet(this, _UmbDefaultCollectionContext_items, "f").next(data.items);
83
- __classPrivateFieldGet(this, _UmbDefaultCollectionContext_totalItems, "f").next(data.total);
82
+ __classPrivateFieldGet(this, _UmbDefaultCollectionContext_items, "f").setValue(data.items);
83
+ __classPrivateFieldGet(this, _UmbDefaultCollectionContext_totalItems, "f").setValue(data.total);
84
84
  this.pagination.setTotalItems(data.total);
85
85
  }
86
86
  }
@@ -90,7 +90,7 @@ export class UmbDefaultCollectionContext extends UmbContextBase {
90
90
  * @memberof UmbCollectionContext
91
91
  */
92
92
  setFilter(filter) {
93
- __classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").next({ ...__classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").getValue(), ...filter });
93
+ __classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").setValue({ ...__classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").getValue(), ...filter });
94
94
  this.requestCollection();
95
95
  }
96
96
  }
@@ -102,7 +102,7 @@ _UmbDefaultCollectionContext_manifest = new WeakMap(), _UmbDefaultCollectionCont
102
102
  }, _UmbDefaultCollectionContext_configure = function _UmbDefaultCollectionContext_configure(configuration) {
103
103
  this.selection.setMultiple(true);
104
104
  this.pagination.setPageSize(configuration.pageSize);
105
- __classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").next({ ...__classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").getValue(), skip: 0, take: configuration.pageSize });
105
+ __classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").setValue({ ...__classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").getValue(), skip: 0, take: configuration.pageSize });
106
106
  }, _UmbDefaultCollectionContext_observeRepository = function _UmbDefaultCollectionContext_observeRepository(repositoryAlias) {
107
107
  new UmbExtensionApiInitializer(this, umbExtensionsRegistry, repositoryAlias, [this._host], (permitted, ctrl) => {
108
108
  this.repository = permitted ? ctrl.api : undefined;