Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

168 rte text color extension #175

Merged
merged 31 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0540a74
#165 Added icon position property to the button component adn adjuste…
AdrianStaskiewicz Apr 24, 2023
452a46b
#168 Add initial files
martyna-ds Apr 24, 2023
609eed9
#168 Add configuration files
martyna-ds Apr 25, 2023
50a41ed
#168 Add color extension - draft, correct pom.xml
martyna-ds Apr 25, 2023
dda0e48
#145 created extensions module and moved tableservice and tableview i…
Rafal-DS Apr 26, 2023
d4a75cf
#163 Added new button modifier option - inverted button (#169)
AdrianStaskiewicz Apr 26, 2023
fd5b88a
#81 Added new breadcrumb element property - icon (#170)
AdrianStaskiewicz Apr 26, 2023
84984ab
#168 Correct configuration
martyna-ds Apr 26, 2023
6a97875
#168 Add new bulma-color module
martyna-ds Apr 27, 2023
4aa2636
#168 Add new bulma-color module
martyna-ds Apr 27, 2023
34ffefb
#168 Toggiling state
martyna-ds Apr 27, 2023
231da4e
#168 ColorDialog
martyna-ds Apr 27, 2023
d6e0fa3
#164 added alignment config option for level item component (#171)
Rafal-DS Apr 28, 2023
833bbde
WOS-168 Content Text weight (#173)
andrechern Apr 28, 2023
3cb8371
#168 Colors list - dynamic css creation
martyna-ds Apr 28, 2023
88d4818
#168 Colors list - dynamic css creation
martyna-ds Apr 28, 2023
ca6fa83
Wos 173 apps to libs (#180)
Rafal-DS May 4, 2023
562177d
WOS-178 init content for hero component (#181)
Rafal-DS May 4, 2023
f1cc9d9
WOS-176 added container style config to navbar component (#182)
Rafal-DS May 4, 2023
0a08340
#170 added vertical alignment for level item component (#177)
Rafal-DS May 4, 2023
2730f94
Merge remote-tracking branch 'origin/develop' into 168-rte-text-color…
martyna-ds May 4, 2023
a2f5009
#168 Move color extension to extensions folder
martyna-ds May 4, 2023
5389968
WOS-170 merge fix
Rafal-DS May 4, 2023
1215c94
Merge remote-tracking branch 'origin/develop' into 168-rte-text-color…
martyna-ds May 4, 2023
8a9061f
WOS-170 one more fix
Rafal-DS May 4, 2023
fb08e4e
Merge remote-tracking branch 'origin/develop' into 168-rte-text-color…
martyna-ds May 4, 2023
784838e
#168 Change /apps to /libs folder name
martyna-ds May 4, 2023
dc183d5
#168 Move configuration to libs in backend
martyna-ds May 4, 2023
0421e53
#168 Move rte configuration to common
martyna-ds May 5, 2023
e596164
Merge remote-tracking branch 'origin/develop' into 168-rte-text-color…
paweljozwicki May 9, 2023
7078ed3
#168 Corrections after pr, bulma fix
martyna-ds May 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sling:resourceType": "wcm/dialogs/components/richtext/configuration",
"sling:resourceSuperType": "wcm/dialogs/components/richtext/configurations/default",
"color": {
"sling:resourceType": "extensions/dialogs/components/richtext/ui/color",
"title": "Color",
"icon": "format_color_text",
"colors": "has-text-primary=#00d1b2, has-text-dark=#363636, has-text-light=#f5f5f5, has-text-black=#000000, has-text-white=#ffffff",
"plugin": {
"sling:resourceType": "extensions/dialogs/components/richtext/plugin/color"
},
"sling:orderBefore": "bulletlist"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"name": "text",
"label": "Text",
"ws:disallowedContext": ["edit:panel"],
"required": true
"required": true,
"configuration": "/libs/bulma/components/common/rte/configurations/default"
},
"panelText": {
"sling:resourceType": "wcm/dialogs/components/richtext",
Expand Down
paweljozwicki marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sling:resourceType": "wcm/dialogs/components/richtext/configuration",
"sling:resourceSuperType": "wcm/dialogs/components/richtext/configurations/default",
"color": {
"sling:resourceType": "extensions/dialogs/components/richtext/ui/color",
"title": "Color",
"icon": "format_color_text",
"colors": "has-text-primary=#00d1b2, has-text-dark=#363636, has-text-light=#f5f5f5, has-text-black=#000000, has-text-white=#ffffff",
"plugin": {
"sling:resourceType": "extensions/dialogs/components/richtext/plugin/color"
},
"sling:orderBefore": "bulletlist"
}
}
18 changes: 18 additions & 0 deletions application/extensions/bulma-color/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2023 Dynamic Solutions

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

node/*
node_modules/*
target/*
/*.js
42 changes: 42 additions & 0 deletions application/extensions/bulma-color/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (C) 2022 Dynamic Solutions
paweljozwicki marked this conversation as resolved.
Show resolved Hide resolved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
rules: {
"curly": 1,
"@typescript-eslint/explicit-function-return-type": [0],
"@typescript-eslint/no-explicit-any": [0],
"ordered-imports": [0],
"object-literal-sort-keys": [0],
"max-len": [1, 120],
"new-parens": 1,
"no-bitwise": 1,
"no-cond-assign": 1,
"no-trailing-spaces": 0,
"eol-last": 1,
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"semi": 1,
"no-var": 0
},
};
157 changes: 157 additions & 0 deletions application/extensions/bulma-color/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/*.iml
/.idea/
.classpath
.settings/
.history

# Based on https://www.gitignore.io/api/node,react,macos,maven,intellij,intellij+iml

# Covers JetBrains IDEs: IntelliJ and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# All IntelliJ .idea files
.idea/

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
*.ipr

# General
.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.flattened-pom.xml

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# rollup.js default build output
dist/

# Uncomment the public line if your project uses Gatsby
# https://nextjs.org/blog/next-9-1#public-directory-support
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
# public

# Storybook build outputs
.out
.storybook-out

# Temporary folders
tmp/
temp/

.DS_*
**/*.backup.*
**/*.back.*

node_modules

*.sublime*

psd
thumb
sketch

# End of https://www.gitignore.io/api/node,react,macos,maven,intellij,intellij+iml

node/
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
1 change: 1 addition & 0 deletions application/extensions/bulma-color/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Color extension
66 changes: 66 additions & 0 deletions application/extensions/bulma-color/babel/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright (C) 2022 Dynamic Solutions
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const importMap = require('./import-map.json');

prepareAliasesMap = () => {
const { rootDir, aliases } = importMap;

Object.keys(aliases).forEach((key) =>
aliases[key] = `${rootDir}${aliases[key]}`
);

return aliases;
}

prepareAliasesMapForDevelopment = () => {
const { aliases, devAliases } = importMap;

Object.keys(devAliases).forEach((devKey) =>
Object.keys(aliases)
.filter((key) => aliases[key].includes(devKey))
.forEach((key) => aliases[key] = aliases[key].replace(devKey, devAliases[devKey]))
);

return aliases;
}

module.exports = (api) => {
api.cache(true);

let aliases = {};

if (process.env.BABEL_ENV === 'development') {
aliases = prepareAliasesMapForDevelopment(aliases);
} else {
aliases = prepareAliasesMap(aliases);
}

return {
presets: [
"@babel/preset-react", "@babel/preset-typescript"
],
plugins: [
[ "module-resolver", {
loglevel: 'silent',
alias: aliases,
}],
["transform-react-remove-prop-types", {
removeImport: true,
}],
]
};
}
8 changes: 8 additions & 0 deletions application/extensions/bulma-color/babel/import-map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"rootDir": "/apps/",
"aliases": {
"^(components.*)": "websight-dialogs-view/web-resources/\\1.js",
"^(.*)": "websight-atlaskit-esm/web-resources/\\1.js"
},
"devAliases": {}
}
1 change: 1 addition & 0 deletions application/extensions/bulma-color/bnd.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sling-Bundle-Resources: /libs/extensions/dialogs/components/richtext;/libs/bulma-color
Loading
Loading