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

feat(editor): add Composite Editor modal dialog #76

Merged
merged 71 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4fadb24
feat(editor): add Composite Editor modal dialog
ghiscoding-SE Aug 15, 2020
f31b5c5
feat(editor): add Composite Editor modal dialog
ghiscoding-SE Aug 15, 2020
ff72afe
feat(styling): add extra SASS utilities and icon colors
ghiscoding Aug 15, 2020
aebd674
refactor(styling): tweak styling and css class names
ghiscoding Aug 15, 2020
ad0d385
feat(styling): add colors.scss file to deal with text & icon colors
ghiscoding Aug 15, 2020
8b95ac8
feat(styling): add extra alternate text/icon filter colors
ghiscoding Aug 16, 2020
2dc2577
refactor(styling): tweak menu dividers width
ghiscoding Aug 17, 2020
0d52487
refactor(editor): fully working composite editor
ghiscoding-SE Aug 18, 2020
2618011
refactor(editor): fix issue found with autoCommitEdit not working
ghiscoding Aug 18, 2020
aa1f7c3
refactor(editor): move all POC code into Extension & Service
ghiscoding-SE Aug 19, 2020
6396388
refactor(styling): remove icon color/width and change sass utilities
ghiscoding-SE Aug 20, 2020
bc78780
refactor(editor): add optional composite header title with parsing
ghiscoding-SE Aug 20, 2020
0315cd7
feat(styling): add bare version of Material/Salesforce Themes
ghiscoding Aug 20, 2020
ee06d89
refactor(tests): fix failing Cypress E2E test
ghiscoding Aug 20, 2020
b13c637
refactor(styling): fix failing test after separating bare versions
ghiscoding Aug 20, 2020
105a55d
feat(editor): start adding Composite Editor Component unit tests
ghiscoding-SE Aug 20, 2020
6a813e8
refactor(editor): Composite only works with "enableCellNavigation"
ghiscoding-SE Aug 20, 2020
aa89eef
refactor(editor): tweak composite editor styling
ghiscoding Aug 21, 2020
e6fb760
refactor(editor): add multiple-select missing images
ghiscoding Aug 21, 2020
e2005ec
refactor(editor): small tweaks with icons and styling
ghiscoding Aug 21, 2020
d70c064
refactor(styling): fix typo in sass file
ghiscoding Aug 21, 2020
19f506f
refactor(editor): add unit tests for Composite Editor Component
ghiscoding-SE Aug 21, 2020
0c0e616
refactor(editor): add Composite Editor backdrop & tweak styling
ghiscoding-SE Aug 22, 2020
7502d6f
refactor(editor): add close outside button & add onBeforeEditCell
ghiscoding Aug 22, 2020
02fd6b3
refactor(editor): tweak close button with small device
ghiscoding Aug 23, 2020
8f13d1f
refactor(editor): add onBeforeEditCell and onCellChange events
ghiscoding Aug 24, 2020
6662fcc
refactor(editor): fully working composite editor with mass changes
ghiscoding-SE Aug 27, 2020
3bfa390
refactor(styling): update SF styling asked by the business
ghiscoding-SE Aug 28, 2020
57006cc
refactor(editor): fix few issues found with Composite Editor
ghiscoding-SE Aug 28, 2020
062b269
refactor(editor): add backdrop static option
ghiscoding-SE Aug 28, 2020
065c5b2
refactor(editor): add optional column group label to Composite Editor
ghiscoding-SE Aug 31, 2020
d70c6ae
feat(formatter): add new Center Formatter
ghiscoding-SE Aug 31, 2020
e515be9
refactor(editor): add Composite Editor Split View option
ghiscoding-SE Aug 31, 2020
35b5dd1
refactor(editor): Composite Editor should work with dynamic editor
ghiscoding-SE Sep 1, 2020
84d654d
feat(editor): add 3 split & a way to disable fields in Composite Editor
ghiscoding-SE Sep 2, 2020
d801e96
feat(editor): add debounce typing delay to some Composite Editors
ghiscoding-SE Sep 2, 2020
ff8ffe6
feat(editor): add Composite Editor onMassSave callback
ghiscoding-SE Sep 3, 2020
d206d55
refactor(editor): tweak code & fix issues for Composite Editor
ghiscoding-SE Sep 4, 2020
d1b99cf
refactor(editors): update to latest SlickGrid for Composite Editor
ghiscoding Sep 5, 2020
c965813
refactor(editors): fix failing unit test
ghiscoding Sep 5, 2020
9992996
refactor(editors): fix failing E2E tests and update Cypress to latest
ghiscoding Sep 5, 2020
5b63b39
Merge branch 'master' into feat/composite-editor
ghiscoding Sep 5, 2020
c8974d7
Merge branch 'master' into feat/composite-editor
ghiscoding Sep 7, 2020
c3de393
fix(editors): all Editors should call commitChanges even when invalid
ghiscoding-SE Sep 8, 2020
9136bb4
feat(editors): add Clear Date button to Date Editor
ghiscoding-SE Sep 9, 2020
3e4b338
refactor(editors): add all label text translations to Composite Editor
ghiscoding-SE Sep 9, 2020
8aada4e
fix(editors): some editors were focusing twice causes Cypress failing
ghiscoding Sep 9, 2020
98ec5da
refactor(editors): fix failing unit tests
ghiscoding Sep 9, 2020
bf49a1e
fix(editors): update to latest Flatpickr version
ghiscoding Sep 9, 2020
68de044
refactor(editors): fix failing unit tests
ghiscoding Sep 9, 2020
4f979c2
Merge remote-tracking branch 'origin/master' into feat/composite-editor
ghiscoding-SE Sep 9, 2020
32134ff
refactor(editors): add unit tests for all Composite Editors
ghiscoding-SE Sep 9, 2020
9b45f09
fix(editors): fixed few issues & add few unit test in Composite Editor
ghiscoding-SE Sep 11, 2020
61e8894
refactor(editors): fix Cypress failing test by fixing editors destroy
ghiscoding Sep 11, 2020
7117ca9
refactor(editors): fix build linter errors
ghiscoding Sep 11, 2020
f24294b
fix(editors): fixed few issues & add few unit tests in Composite Editor
ghiscoding-SE Sep 11, 2020
95b3aff
refactor(editors): add icons to all Composite Editors buttons
ghiscoding-SE Sep 11, 2020
1aaa74b
feat(icons): add Material Design Icons page
ghiscoding-SE Sep 11, 2020
6110a56
feat(icons): tweak Material Design Icons page
ghiscoding-SE Sep 11, 2020
4c3e8f7
feat(icons): tweak Material Design Icons page
ghiscoding-SE Sep 11, 2020
3b5f40d
feat(tests): add few Cypress E2E tests for Example 12
ghiscoding Sep 12, 2020
80dab90
feat(tests): add all Cypress E2E tests
ghiscoding Sep 14, 2020
3b03e15
refactor(tests): tweak Cypress test description
ghiscoding Sep 14, 2020
b6a44b2
refactor(editors): tweak clear date button styling
ghiscoding-SE Sep 14, 2020
1338ef8
Merge branch 'feat/composite-editor' of https://github.com/ghiscoding…
ghiscoding-SE Sep 14, 2020
cf8b9a6
refactor(editors): small fixes and unit test to Composite Editor
ghiscoding-SE Sep 14, 2020
fc3425a
refactor(editors): tweak date editor code
ghiscoding Sep 14, 2020
d4cf4d4
refactor(editors): tweak Composite Editors Cypress E2E tests
ghiscoding Sep 15, 2020
62f2e53
feat(editors): add Composite Editor missing unit tests
ghiscoding-SE Sep 15, 2020
cddf2d9
refactor(core): rebuild vanilla grid bundle
ghiscoding-SE Sep 15, 2020
3d6be99
(demo): update github demo page
ghiscoding-SE Sep 15, 2020
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
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars-experimental": "error",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
Expand Down Expand Up @@ -139,6 +141,7 @@
"no-unsafe-finally": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-unused-vars": "off",
"no-var": "error",
"object-shorthand": "error",
"one-var": [
Expand Down Expand Up @@ -167,4 +170,4 @@
"use-isnan": "error",
"valid-typeof": "off"
}
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ yarn run test:watch
- [x] should support `enableRenderHtml` (same as Select Filter)
- [x] should support instance callbacks (`_renderItem`)
- [x] try to copy SF lookup component look & feel ([SF Lookup](https://www.lightningdesignsystem.com/components/lookups/#site-main-content))
- [x] Mutiple-Select is not showing caret icon to represent a dropdown in SF
- [x] Check if Date Picker works correctly with new latest version of `Flatpickr`
- [ ] See if we can get `DOM Purify` to work in SF, else keep the custom sanitizer
- [ ] See if we can get all the vanilla-grid-bundle `instances` as `readonly` class members
- [ ] See if adding `lerna-changelog` make sense
- [ ] Mutiple-Select is not showing caret icon to represent a dropdown in SF
- [ ] Check if Date Picker works correctly with new latest version of `Flatpickr`
304 changes: 0 additions & 304 deletions docs/app.4c7e5103b75b098aec5d.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/app.4c7e5103b75b098aec5d.bundle.map

This file was deleted.

Large diffs are not rendered by default.

304 changes: 304 additions & 0 deletions docs/app.cc5b4c8f07181be17251.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/app.cc5b4c8f07181be17251.bundle.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/assets/i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"ALL_SELECTED": "All Selected",
"ALL_X_RECORDS_SELECTED": "All {{x}} records selected",
"APPLY_MASS_UPDATE": "Apply Mass Update",
"APPLY_TO_SELECTION": "Update Selection",
"CANCEL": "Cancel",
"CLEAR_ALL_FILTERS": "Clear all Filters",
"CLEAR_ALL_GROUPING": "Clear all Grouping",
Expand Down Expand Up @@ -44,6 +47,7 @@
"TOGGLE_FILTER_ROW": "Toggle Filter Row",
"TOGGLE_PRE_HEADER_ROW": "Toggle Pre-Header Row",
"X_OF_Y_SELECTED": "# of % selected",
"X_OF_Y_MASS_SELECTED": "{{x}} of {{y}} selected",
"BILLING": {
"ADDRESS": {
"STREET": "Billing Address Street",
Expand Down
4 changes: 4 additions & 0 deletions docs/assets/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"ALL_SELECTED": "Tout sélectionnés",
"ALL_X_RECORDS_SELECTED": "Sur tous les {{x}} éléments",
"APPLY_MASS_UPDATE": "Mettre à jour en masse",
"APPLY_TO_SELECTION": "Mettre à jour la sélection",
"CANCEL": "Annuler",
"CLEAR_ALL_FILTERS": "Supprimer tous les filtres",
"CLEAR_ALL_GROUPING": "Supprimer tous les groupes",
Expand Down Expand Up @@ -44,6 +47,7 @@
"TOGGLE_FILTER_ROW": "Basculer la ligne des filtres",
"TOGGLE_PRE_HEADER_ROW": "Basculer la ligne de pré-en-tête",
"X_OF_Y_SELECTED": "# de % sélectionnés",
"X_OF_Y_MASS_SELECTED": "{{x}} de {{y}} sélectionnés",
"BILLING": {
"ADDRESS": {
"STREET": "Adresse de facturation",
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html><head><meta charset="utf-8"><title>Slickgrid-Universal</title><meta name="viewport" content="width=device-width,initial-scale=1"><base href=""><link rel="icon" href="favicon.ico"><link href="app.523343e25b1b252315f4.bundle.css" rel="stylesheet"></head><body class="has-navbar-fixed-top"><script async defer="defer" src="//buttons.github.io/buttons.js"></script><div app="main"><div style="margin: 50px; font-weight: bold;">LOADING...</div></div><script src="app.4c7e5103b75b098aec5d.bundle.js"></script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>Slickgrid-Universal</title><meta name="viewport" content="width=device-width,initial-scale=1"><base href=""><link rel="icon" href="favicon.ico"><link href="app.c10091e04e32aeeff903.bundle.css" rel="stylesheet"></head><body class="has-navbar-fixed-top"><script async defer="defer" src="//buttons.github.io/buttons.js"></script><div app="main"><div style="margin: 50px; font-weight: bold;">LOADING...</div></div><script src="app.cc5b4c8f07181be17251.bundle.js"></script></body></html>
4 changes: 4 additions & 0 deletions examples/webpack-demo-vanilla-bundle/assets/i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"ALL_SELECTED": "All Selected",
"ALL_X_RECORDS_SELECTED": "All {{x}} records selected",
"APPLY_MASS_UPDATE": "Apply Mass Update",
"APPLY_TO_SELECTION": "Update Selection",
"CANCEL": "Cancel",
"CLEAR_ALL_FILTERS": "Clear all Filters",
"CLEAR_ALL_GROUPING": "Clear all Grouping",
Expand Down Expand Up @@ -44,6 +47,7 @@
"TOGGLE_FILTER_ROW": "Toggle Filter Row",
"TOGGLE_PRE_HEADER_ROW": "Toggle Pre-Header Row",
"X_OF_Y_SELECTED": "# of % selected",
"X_OF_Y_MASS_SELECTED": "{{x}} of {{y}} selected",
"BILLING": {
"ADDRESS": {
"STREET": "Billing Address Street",
Expand Down
4 changes: 4 additions & 0 deletions examples/webpack-demo-vanilla-bundle/assets/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"ALL_SELECTED": "Tout sélectionnés",
"ALL_X_RECORDS_SELECTED": "Sur tous les {{x}} éléments",
"APPLY_MASS_UPDATE": "Mettre à jour en masse",
"APPLY_TO_SELECTION": "Mettre à jour la sélection",
"CANCEL": "Annuler",
"CLEAR_ALL_FILTERS": "Supprimer tous les filtres",
"CLEAR_ALL_GROUPING": "Supprimer tous les groupes",
Expand Down Expand Up @@ -44,6 +47,7 @@
"TOGGLE_FILTER_ROW": "Basculer la ligne des filtres",
"TOGGLE_PRE_HEADER_ROW": "Basculer la ligne de pré-en-tête",
"X_OF_Y_SELECTED": "# de % sélectionnés",
"X_OF_Y_MASS_SELECTED": "{{x}} de {{y}} sélectionnés",
"BILLING": {
"ADDRESS": {
"STREET": "Adresse de facturation",
Expand Down
2 changes: 2 additions & 0 deletions examples/webpack-demo-vanilla-bundle/src/app-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export class AppRouting {
{ route: 'example09', name: 'example09', title: 'Example09', moduleId: './examples/example09' },
{ route: 'example10', name: 'example10', title: 'Example10', moduleId: './examples/example10' },
{ route: 'example11', name: 'example11', title: 'Example11', moduleId: './examples/example11' },
{ route: 'example12', name: 'example12', title: 'Example12', moduleId: './examples/example12' },
{ route: 'example50', name: 'example50', title: 'Example50', moduleId: './examples/example50' },
{ route: 'example51', name: 'example51', title: 'Example51', moduleId: './examples/example51' },
{ route: 'icons', name: 'icons', title: 'icons', moduleId: './examples/icons' },
{ route: '', redirect: 'example01' },
{ route: '**', redirect: 'example01' }
];
Expand Down
9 changes: 7 additions & 2 deletions examples/webpack-demo-vanilla-bundle/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ <h4 class="title is-4 has-text-white">Slickgrid-Universal</h4>
<a class="navbar-item" href="//github.com/ghiscoding/slickgrid-universal/wiki" target="_blank">
Documentation
</a>

<a class="navbar-item" onclick.delegate="loadRoute('icons')">
Material Design Icons
</a>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
Examples
Expand Down Expand Up @@ -64,6 +66,9 @@ <h4 class="title is-4 has-text-white">Slickgrid-Universal</h4>
<a class="navbar-item" onclick.delegate="loadRoute('example11')">
Example11 - Batch Editing
</a>
<a class="navbar-item" onclick.delegate="loadRoute('example12')">
Example12 - Item Editor Modal
</a>
<!--
<hr class="navbar-divider">
<a class="navbar-item" onclick.delegate="loadRoute('example50')">Example50 - SE Tree Data</a>
Expand All @@ -76,4 +81,4 @@ <h4 class="title is-4 has-text-white">Slickgrid-Universal</h4>

<div class="demo-container container is-fluid" style="padding-top: 20px">
<view-route></view-route>
</div>
</div>
4 changes: 2 additions & 2 deletions examples/webpack-demo-vanilla-bundle/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export class App {
}

disposeAll() {
this.renderer.dispose();
this.renderer?.dispose();

for (const vmKey of Object.keys(this.viewModelObj)) {
const viewModel = this.viewModelObj[vmKey];
if (viewModel && viewModel.dispose) {
viewModel.dispose();
viewModel?.dispose();
delete window[vmKey];
delete this.viewModelObj[vmKey];
}
Expand Down
13 changes: 7 additions & 6 deletions examples/webpack-demo-vanilla-bundle/src/examples/example03.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ $control-height: 2.4em;
@import '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-salesforce.scss';
@import 'bulma/bulma';

.slick-groupby-remove.mdi-close {
/** 1. use `filter` color */
// filter: invert(32%) sepia(96%) saturate(7466%) hue-rotate(356deg) brightness(97%) contrast(120%);
/** use following styling of the Close icon or just use .icon-danger as defined in the example code */
// .slick-groupby-remove.mdi-close {
// /** 1. use `filter` color */
// // filter: invert(32%) sepia(96%) saturate(7466%) hue-rotate(356deg) brightness(97%) contrast(120%);

/** 2. or use the SASS @mixin that will produce the `filter` color */
@include recolor(#ff0000, 0.9); // convert red color into `filter` with opacity of 0.9
}
// /** 2. or use the SASS @mixin that will produce the `filter` color */
// @include recolor(#ff0000, 0.9); // convert red color into `filter` with opacity of 0.9
// }
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export class Example3 {
draggableGrouping: {
dropPlaceHolderText: 'Drop a column header here to group by the column',
// groupIconCssClass: 'fa fa-outdent',
deleteIconCssClass: 'fa fa-times mdi mdi-close',
deleteIconCssClass: 'mdi mdi-close color-danger',
onGroupChanged: (e, args) => this.onGroupChanged(args),
onExtensionRegistered: (extension) => this.draggableGroupingPlugin = extension,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
$icon-color-mdi-close: #363636;
@import '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-material.scss';
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
// You can change the SVG color using their associated SASS $icon-color-mdi-XYZ
$icon-width-mdi-plus: 14px;
$icon-width-mdi-arrow-collapse: 14px;
$icon-width-mdi-arrow-expand: 14px;

@import '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-material.scss';
13 changes: 0 additions & 13 deletions examples/webpack-demo-vanilla-bundle/src/examples/example06.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
// You can change the SVG color using their associated SASS $icon-color-mdi-XYZ
$icon-width-mdi-plus: 14px;
$icon-width-mdi-arrow-collapse: 14px;
$icon-width-mdi-arrow-expand: 14px;
$icon-width-mdi-close-thick: 12px;

/* You can change the SASS color via the associated variable, BUT it's better to use the recolor @mixin shown down below */
// $icon-color-mdi-file-pdf-outline: #f14668;
// $icon-color-mdi-file-music-outline: #3298dc;
// $icon-color-mdi-file-excel-outline: #1E9F75;
// $icon-color-mdi-folder: orange;
// $icon-color-mdi-folder-open: #ffa500;

@import '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-material.scss';

.icon.mdi-file-pdf-outline {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class Example7 {
{
id: 'duration', name: 'Duration', field: 'duration', sortable: true,
editor: { model: Editors.text, alwaysSaveOnEnterKey: true, },
formatter: (row: number, cell: number, value: any) => value > 1 ? `${value} days` : `${value} day`,
formatter: (_row: number, _cell: number, value: any) => value > 1 ? `${value} days` : `${value} day`,
},
{ id: 'percentComplete', name: '% Complete', field: 'percentComplete', sortable: true, editor: { model: Editors.slider, minValue: 0, maxValue: 100, }, },
{
Expand Down Expand Up @@ -142,7 +142,7 @@ export class Example7 {
return true;
}

onMoveRows(e, args) {
onMoveRows(_e, args) {
const extractedRows = [];
const rows = args.rows;
const insertBefore = args.insertBefore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
$icon-color-mdi-close: #363636;
@import '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-material.scss';
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ $autocomplete-max-height: 250px;

@import '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-salesforce.scss';
@import 'bulma/bulma';

.unsaved-editable-field {
background-color: #fbfdd1 !important;
}
Loading