Skip to content

Commit 297b4b7

Browse files
committed
Add custom component
1 parent 14cf2ac commit 297b4b7

25 files changed

+32949
-0
lines changed

.builderrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
archetypes:
3+
- "@servicenow/cli-archetype"
4+
- "@servicenow/cli-component-archetype"

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*.js]
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
indent_style = tab
9+
10+
[*.md]
11+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test
2+
scripts

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.DS_Store
2+
node_modules
3+
lib
4+
dist
5+
target
6+
node
7+
node_tmp
8+
npm-debug.log
9+
*.iml
10+
*.tgz
11+
coverage
12+
.now-cli
13+
.babelrc
14+
/clover.xml
15+
/coverage-final.json
16+
/lcov-report/
17+
/lcov.info
18+
/dist/
19+
/lib/
20+
/target/

.npmignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
*.swp
2+
*~
3+
*.iml
4+
*.tgz
5+
.*.haste_cache.*
6+
.DS_Store
7+
.idea
8+
.babelrc
9+
.eslintrc
10+
npm-debug.log
11+
!lib
12+
!dist
13+
__tests__
14+
__mocks__
15+
target
16+
coverage
17+
node_modules
18+
node
19+
node_tmp
20+
/.now-cli/
21+
/lcov-report/
22+
!/now-cli.*
23+
!/dist/
24+
!/lib/
25+
!/target/

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
menu-builder-uic
2+
===============================================
3+
4+
5+
Component Authors, provide some documentation for your users here!

example/element.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import '../src/x-759224-menu-builder-uic';
2+
3+
const el = document.createElement('DIV');
4+
document.body.appendChild(el);
5+
6+
el.innerHTML = `
7+
<x-759224-menu-builder-uic></x-759224-menu-builder-uic>
8+
`;

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

now-cli.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"development": {
3+
"proxy": {
4+
"proxies": ["/api"]
5+
}
6+
},
7+
"styles": {
8+
"themes": [{
9+
"module": "@servicenow/sass-theme",
10+
"main": ["theme.scss"],
11+
"copyFiles": ["type/*", "*.scss"]
12+
}]
13+
}
14+
}

now-ui.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"components": {
3+
"x-759224-menu-builder-uic": {
4+
"actions": [
5+
{
6+
"name": "TREE_UPDATED",
7+
"payload": [
8+
{
9+
"name": "tree"
10+
}
11+
]
12+
},
13+
{
14+
"name": "MENU_UPDATED",
15+
"payload": [
16+
{
17+
"name": "menu"
18+
}
19+
]
20+
},
21+
{
22+
"name": "JSON_IMPORTED",
23+
"payload": [
24+
{
25+
"name": "json"
26+
}
27+
]
28+
}
29+
],
30+
"innerComponents": [
31+
"menu-editor",
32+
"menu-item",
33+
"menu-tree",
34+
"menu-ui"
35+
],
36+
"uiBuilder": {
37+
"associatedTypes": ["global.core", "global.landing-page"],
38+
"label": "Menu Builder",
39+
"icon": "add-item-below-fill",
40+
"description": "Import, edit, and build menus for your UI Buider Portal Experiences using a user-friendly interface.",
41+
"category": "primitives"
42+
},
43+
"properties": [
44+
{
45+
"name": "menuTree",
46+
"label": "Menu Tree"
47+
},
48+
{
49+
"name": "importJSON",
50+
"label": "Import JSON"
51+
}
52+
]
53+
}
54+
},
55+
"scopeName": "x_759224_menu_bu_1"
56+
}

0 commit comments

Comments
 (0)