@newlogic-digital/stimulus-components 0.0.2 → 0.0.4
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.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"eslint": "eslint '**/*.js'",
|
|
@@ -15,18 +15,14 @@
|
|
|
15
15
|
"eslint": "^9.7.0",
|
|
16
16
|
"@types/grecaptcha": "^3.0.9",
|
|
17
17
|
"neostandard": "^0.11.1",
|
|
18
|
-
"@newlogic-digital/cookieconsent-js": "^0.2.
|
|
18
|
+
"@newlogic-digital/cookieconsent-js": "^0.2.2",
|
|
19
19
|
"winduum": "^2.0.0-next.15"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
|
-
"
|
|
23
|
-
"components",
|
|
24
|
-
"utilities"
|
|
22
|
+
"src"
|
|
25
23
|
],
|
|
26
24
|
"exports": {
|
|
27
|
-
"./
|
|
28
|
-
"./utilities/*": "./utilities/*",
|
|
29
|
-
".": "./index.js"
|
|
25
|
+
"./src/*": "./src/*"
|
|
30
26
|
},
|
|
31
27
|
"repository": {
|
|
32
28
|
"type": "git",
|
|
@@ -16,7 +16,7 @@ export class CookieConsentCommon extends Controller {
|
|
|
16
16
|
|
|
17
17
|
export class CookieConsentDialog extends CookieConsentCommon {
|
|
18
18
|
async connect() {
|
|
19
|
-
initCookieConsent(this.getCookieConsentItem() ?? [])
|
|
19
|
+
initCookieConsent(document, this.getCookieConsentItem() ?? [])
|
|
20
20
|
|
|
21
21
|
if (document.querySelector('.x-cookieconsent-form')) {
|
|
22
22
|
return
|
|
@@ -45,7 +45,7 @@ export class CookieConsentDialog extends CookieConsentCommon {
|
|
|
45
45
|
const { closeDialog } = await import('winduum/src/components/dialog/index.js')
|
|
46
46
|
|
|
47
47
|
await setCookieConsent(type)
|
|
48
|
-
initCookieConsent(type)
|
|
48
|
+
initCookieConsent(document, type)
|
|
49
49
|
await closeDialog(this.element, { remove: true })
|
|
50
50
|
}
|
|
51
51
|
}
|
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
|