@newlogic-digital/stimulus-components 0.0.2 → 0.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newlogic-digital/stimulus-components",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "eslint": "eslint '**/*.js'",
@@ -19,14 +19,10 @@
19
19
  "winduum": "^2.0.0-next.15"
20
20
  },
21
21
  "files": [
22
- "index.js",
23
- "components",
24
- "utilities"
22
+ "src"
25
23
  ],
26
24
  "exports": {
27
- "./components/*": "./components/*",
28
- "./utilities/*": "./utilities/*",
29
- ".": "./index.js"
25
+ "./src/*": "./src/*"
30
26
  },
31
27
  "repository": {
32
28
  "type": "git",
package/index.js DELETED
@@ -1,18 +0,0 @@
1
- import { initActions, initControllers } from '@newlogic-digital/utils-js'
2
-
3
- export const initStimulus = (element, { controllers, actions }) => {
4
- initControllers(element, controllers)
5
- initActions(element, actions)
6
- }
7
-
8
- export const useController = (controller, target, application) => {
9
- const getController = application.getControllerForElementAndIdentifier(document.querySelector(target || `.${controller}`), controller) ?? {}
10
-
11
- getController.invoke = (action, event) => {
12
- return getController[action] ? getController[action](event ?? { params: {} }) : undefined
13
- }
14
-
15
- return getController
16
- }
17
-
18
- export default { initStimulus, useController }
File without changes
File without changes
File without changes