@domql/state 2.5.179 → 2.5.181

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/create.js CHANGED
@@ -20,6 +20,11 @@ import {
20
20
  quietUpdate,
21
21
  quietReplace,
22
22
  applyReplace,
23
+ setByPath,
24
+ setPathCollection,
25
+ removeByPath,
26
+ removePathCollection,
27
+ getByPath,
23
28
  keys,
24
29
  values
25
30
  } from './methods'
@@ -130,6 +135,13 @@ const applyMethods = (element) => {
130
135
  quietReplace: quietReplace.bind(state),
131
136
  reset: reset.bind(state),
132
137
  parent: element.parent.state || state,
138
+
139
+ setByPath: setByPath.bind(state),
140
+ setPathCollection: setPathCollection.bind(state),
141
+ removeByPath: removeByPath.bind(state),
142
+ removePathCollection: removePathCollection.bind(state),
143
+ getByPath: getByPath.bind(state),
144
+
133
145
  keys: keys.bind(state),
134
146
  values: values.bind(state),
135
147
  __element: element,
@@ -122,6 +122,11 @@ const applyMethods = (element) => {
122
122
  quietReplace: import_methods.quietReplace.bind(state),
123
123
  reset: import_methods.reset.bind(state),
124
124
  parent: element.parent.state || state,
125
+ setByPath: import_methods.setByPath.bind(state),
126
+ setPathCollection: import_methods.setPathCollection.bind(state),
127
+ removeByPath: import_methods.removeByPath.bind(state),
128
+ removePathCollection: import_methods.removePathCollection.bind(state),
129
+ getByPath: import_methods.getByPath.bind(state),
125
130
  keys: import_methods.keys.bind(state),
126
131
  values: import_methods.values.bind(state),
127
132
  __element: element,
@@ -48,5 +48,10 @@ const IGNORE_STATE_PARAMS = [
48
48
  "__depends",
49
49
  "__ref",
50
50
  "__children",
51
- "root"
51
+ "root",
52
+ "setByPath",
53
+ "setPathCollection",
54
+ "removeByPath",
55
+ "removePathCollection",
56
+ "getByPath"
52
57
  ];
@@ -113,7 +113,7 @@ const checkIfInherits = (element) => {
113
113
  const isState = function(state) {
114
114
  if (!(0, import_utils.isObjectLike)(state))
115
115
  return false;
116
- return state.update && state.parse && state.clean && state.create && state.parent && state.destroy && state.rootUpdate && state.parentUpdate && state.keys && state.values && state.toggle && state.replace && state.quietUpdate && state.quietReplace && state.add && state.apply && state.applyReplace && state.applyFunction && state.__element && state.__children;
116
+ return state.update && state.parse && state.clean && state.create && state.parent && state.destroy && state.rootUpdate && state.parentUpdate && state.keys && state.values && state.toggle && state.replace && state.quietUpdate && state.quietReplace && state.add && state.apply && state.applyReplace && state.setByPath && state.setPathCollection && state.removeByPath && state.removePathCollection && state.getByPath && state.applyFunction && state.__element && state.__children;
117
117
  };
118
118
  const createNestedObjectByKeyPath = (path, value) => {
119
119
  if (!path) {
package/ignore.js CHANGED
@@ -3,5 +3,6 @@
3
3
  export const IGNORE_STATE_PARAMS = [
4
4
  'update', 'parse', 'clean', 'create', 'destroy', 'add', 'toggle', 'remove', 'apply', 'set', 'reset',
5
5
  'replace', 'quietReplace', 'quietUpdate', 'applyReplace', 'applyFunction', 'keys', 'values', 'ref',
6
- 'rootUpdate', 'parentUpdate', 'parent', '__element', '__depends', '__ref', '__children', 'root'
6
+ 'rootUpdate', 'parentUpdate', 'parent', '__element', '__depends', '__ref', '__children', 'root',
7
+ 'setByPath', 'setPathCollection', 'removeByPath', 'removePathCollection', 'getByPath'
7
8
  ]
package/inherit.js CHANGED
@@ -105,6 +105,11 @@ export const isState = function (state) {
105
105
  state.add &&
106
106
  state.apply &&
107
107
  state.applyReplace &&
108
+ state.setByPath &&
109
+ state.setPathCollection &&
110
+ state.removeByPath &&
111
+ state.removePathCollection &&
112
+ state.getByPath &&
108
113
  state.applyFunction &&
109
114
  state.__element &&
110
115
  state.__children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/state",
3
- "version": "2.5.179",
3
+ "version": "2.5.181",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/esm/index.js",
@@ -31,5 +31,5 @@
31
31
  "@domql/report": "^2.5.162",
32
32
  "@domql/utils": "^2.5.179"
33
33
  },
34
- "gitHead": "6dd81dc7848b03bd9bf564dbc82cd95af713ae21"
34
+ "gitHead": "4e5c3841725d9b2ffaeacc0e32bbff5c913b80b4"
35
35
  }