angular-slickgrid 4.2.0 → 4.2.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/LICENSE +20 -20
- package/{dist/app → app}/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +2 -2
- package/{dist/app → app}/modules/angular-slickgrid/constants.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/extensions/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/extensions/slickRowDetailView.d.ts +0 -2
- package/{dist/app → app}/modules/angular-slickgrid/global-grid-options.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/angularComponentOutput.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/angularGridInstance.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/externalTestingDependencies.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/gridOption.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/rowDetailView.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/slickGrid.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/modules/angular-slickgrid.module.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/angularUtil.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/bsDropdown.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/container.service.d.ts +1 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/translater.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/utilities.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/slickgrid-config.d.ts +0 -0
- package/docs/assets/lib/multiple-select/README.md +17 -0
- package/{dist/esm2020 → esm2020}/angular-slickgrid.mjs +0 -0
- package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +1170 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/constants.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +298 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/index.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +2 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +43 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
- package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +29 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/index.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
- package/{dist/esm2020 → esm2020}/public_api.mjs +1 -1
- package/{dist/fesm2015 → fesm2015}/angular-slickgrid.mjs +48 -51
- package/fesm2015/angular-slickgrid.mjs.map +1 -0
- package/{dist/fesm2020 → fesm2020}/angular-slickgrid.mjs +48 -51
- package/fesm2020/angular-slickgrid.mjs.map +1 -0
- package/{dist/i18n → i18n}/en.json +89 -89
- package/{dist/i18n → i18n}/fr.json +90 -90
- package/{dist/angular-slickgrid.d.ts → index.d.ts} +0 -0
- package/package.json +33 -118
- package/{dist/public_api.d.ts → public_api.d.ts} +0 -0
- package/test/cypress/node_modules/@cypress/request/README.md +1038 -0
- package/test/cypress/node_modules/@cypress/xvfb/README.md +48 -0
- package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +437 -0
- package/test/cypress/node_modules/@types/node/README.md +16 -0
- package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +16 -0
- package/test/cypress/node_modules/@types/sizzle/README.md +16 -0
- package/test/cypress/node_modules/@types/yauzl/README.md +16 -0
- package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +16 -0
- package/test/cypress/node_modules/aggregate-error/README.md +61 -0
- package/test/cypress/node_modules/ansi-colors/README.md +315 -0
- package/test/cypress/node_modules/ansi-escapes/README.md +245 -0
- package/test/cypress/node_modules/ansi-regex/README.md +78 -0
- package/test/cypress/node_modules/ansi-styles/README.md +152 -0
- package/test/cypress/node_modules/arch/README.md +71 -0
- package/test/cypress/node_modules/asn1/README.md +50 -0
- package/test/cypress/node_modules/assert-plus/README.md +162 -0
- package/test/cypress/node_modules/astral-regex/README.md +46 -0
- package/test/cypress/node_modules/async/README.md +60 -0
- package/test/cypress/node_modules/asynckit/README.md +233 -0
- package/test/cypress/node_modules/at-least-node/README.md +25 -0
- package/test/cypress/node_modules/aws-sign2/README.md +4 -0
- package/test/cypress/node_modules/aws4/README.md +183 -0
- package/test/cypress/node_modules/balanced-match/README.md +91 -0
- package/test/cypress/node_modules/base64-js/README.md +34 -0
- package/test/cypress/node_modules/bcrypt-pbkdf/README.md +45 -0
- package/test/cypress/node_modules/blob-util/README.md +623 -0
- package/test/cypress/node_modules/bluebird/README.md +57 -0
- package/test/cypress/node_modules/brace-expansion/README.md +129 -0
- package/test/cypress/node_modules/buffer/README.md +410 -0
- package/test/cypress/node_modules/buffer-crc32/README.md +47 -0
- package/test/cypress/node_modules/cachedir/README.md +27 -0
- package/test/cypress/node_modules/caseless/README.md +45 -0
- package/test/cypress/node_modules/chalk/README.md +293 -0
- package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +76 -0
- package/test/cypress/node_modules/check-more-types/README.md +952 -0
- package/test/cypress/node_modules/ci-info/README.md +114 -0
- package/test/cypress/node_modules/clean-stack/README.md +76 -0
- package/test/cypress/node_modules/cli-cursor/README.md +55 -0
- package/test/cypress/node_modules/cli-table3/README.md +218 -0
- package/test/cypress/node_modules/cli-truncate/README.md +139 -0
- package/test/cypress/node_modules/color-convert/README.md +68 -0
- package/test/cypress/node_modules/color-name/README.md +11 -0
- package/test/cypress/node_modules/colorette/README.md +102 -0
- package/test/cypress/node_modules/colors/README.md +221 -0
- package/test/cypress/node_modules/combined-stream/README.md +138 -0
- package/test/cypress/node_modules/commander/README.md +737 -0
- package/test/cypress/node_modules/common-tags/README.md +687 -0
- package/test/cypress/node_modules/core-util-is/README.md +3 -0
- package/test/cypress/node_modules/cross-spawn/README.md +96 -0
- package/test/cypress/node_modules/cypress/README.md +25 -0
- package/test/cypress/node_modules/cypress/mount-utils/README.md +14 -0
- package/test/cypress/node_modules/cypress/react/README.md +414 -0
- package/test/cypress/node_modules/cypress/vue/README.md +678 -0
- package/test/cypress/node_modules/cypress/vue2/README.md +693 -0
- package/test/cypress/node_modules/dashdash/README.md +574 -0
- package/test/cypress/node_modules/dayjs/README.md +128 -0
- package/test/cypress/node_modules/debug/README.md +455 -0
- package/test/cypress/node_modules/delayed-stream/README.md +141 -0
- package/test/cypress/node_modules/ecc-jsbn/README.md +8 -0
- package/test/cypress/node_modules/emoji-regex/README.md +73 -0
- package/test/cypress/node_modules/end-of-stream/README.md +54 -0
- package/test/cypress/node_modules/enquirer/README.md +1752 -0
- package/test/cypress/node_modules/escape-string-regexp/README.md +27 -0
- package/test/cypress/node_modules/eventemitter2/README.md +809 -0
- package/test/cypress/node_modules/execa/README.md +656 -0
- package/test/cypress/node_modules/executable/README.md +64 -0
- package/test/cypress/node_modules/extend/README.md +81 -0
- package/test/cypress/node_modules/extract-zip/README.md +57 -0
- package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +455 -0
- package/test/cypress/node_modules/extsprintf/README.md +46 -0
- package/test/cypress/node_modules/fd-slicer/README.md +199 -0
- package/test/cypress/node_modules/figures/README.md +139 -0
- package/test/cypress/node_modules/forever-agent/README.md +4 -0
- package/test/cypress/node_modules/form-data/README.md +234 -0
- package/test/cypress/node_modules/fs-extra/README.md +264 -0
- package/test/cypress/node_modules/fs.realpath/README.md +33 -0
- package/test/cypress/node_modules/get-stream/README.md +124 -0
- package/test/cypress/node_modules/getos/README.md +79 -0
- package/test/cypress/node_modules/getpass/README.md +32 -0
- package/test/cypress/node_modules/glob/README.md +375 -0
- package/test/cypress/node_modules/global-dirs/README.md +72 -0
- package/test/cypress/node_modules/graceful-fs/README.md +133 -0
- package/test/cypress/node_modules/has-flag/README.md +89 -0
- package/test/cypress/node_modules/http-signature/README.md +80 -0
- package/test/cypress/node_modules/human-signals/README.md +155 -0
- package/test/cypress/node_modules/ieee754/README.md +51 -0
- package/test/cypress/node_modules/indent-string/README.md +70 -0
- package/test/cypress/node_modules/inflight/README.md +37 -0
- package/test/cypress/node_modules/inherits/README.md +42 -0
- package/test/cypress/node_modules/ini/README.md +102 -0
- package/test/cypress/node_modules/is-ci/README.md +50 -0
- package/test/cypress/node_modules/is-fullwidth-code-point/README.md +39 -0
- package/test/cypress/node_modules/is-installed-globally/README.md +31 -0
- package/test/cypress/node_modules/is-path-inside/README.md +63 -0
- package/test/cypress/node_modules/is-stream/README.md +57 -0
- package/test/cypress/node_modules/is-typedarray/README.md +16 -0
- package/test/cypress/node_modules/isexe/README.md +51 -0
- package/test/cypress/node_modules/isstream/README.md +66 -0
- package/test/cypress/node_modules/jsbn/README.md +175 -0
- package/test/cypress/node_modules/json-schema/README.md +3 -0
- package/test/cypress/node_modules/json-stringify-safe/README.md +52 -0
- package/test/cypress/node_modules/jsonfile/README.md +205 -0
- package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +76 -0
- package/test/cypress/node_modules/jsprim/README.md +287 -0
- package/test/cypress/node_modules/lazy-ass/README.md +269 -0
- package/test/cypress/node_modules/listr2/README.md +17 -0
- package/test/cypress/node_modules/lodash/README.md +39 -0
- package/test/cypress/node_modules/lodash.once/README.md +18 -0
- package/test/cypress/node_modules/log-symbols/README.md +51 -0
- package/test/cypress/node_modules/log-update/README.md +97 -0
- package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +66 -0
- package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +97 -0
- package/test/cypress/node_modules/lru-cache/README.md +166 -0
- package/test/cypress/node_modules/merge-stream/README.md +78 -0
- package/test/cypress/node_modules/mime-db/README.md +102 -0
- package/test/cypress/node_modules/mime-types/README.md +123 -0
- package/test/cypress/node_modules/mimic-fn/README.md +69 -0
- package/test/cypress/node_modules/minimatch/README.md +209 -0
- package/test/cypress/node_modules/ms/README.md +60 -0
- package/test/cypress/node_modules/npm-run-path/README.md +115 -0
- package/test/cypress/node_modules/once/README.md +79 -0
- package/test/cypress/node_modules/onetime/README.md +94 -0
- package/test/cypress/node_modules/ospath/README.md +53 -0
- package/test/cypress/node_modules/p-map/README.md +89 -0
- package/test/cypress/node_modules/path-is-absolute/README.md +59 -0
- package/test/cypress/node_modules/path-key/README.md +61 -0
- package/test/cypress/node_modules/pend/README.md +41 -0
- package/test/cypress/node_modules/performance-now/README.md +30 -0
- package/test/cypress/node_modules/pify/README.md +119 -0
- package/test/cypress/node_modules/pretty-bytes/README.md +131 -0
- package/test/cypress/node_modules/proxy-from-env/README.md +131 -0
- package/test/cypress/node_modules/psl/README.md +215 -0
- package/test/cypress/node_modules/pump/README.md +65 -0
- package/test/cypress/node_modules/punycode/README.md +122 -0
- package/test/cypress/node_modules/qs/README.md +475 -0
- package/test/cypress/node_modules/request-progress/README.md +78 -0
- package/test/cypress/node_modules/restore-cursor/README.md +26 -0
- package/test/cypress/node_modules/rimraf/README.md +101 -0
- package/test/cypress/node_modules/rxjs/README.md +147 -0
- package/test/cypress/node_modules/rxjs/_esm2015/README.md +147 -0
- package/test/cypress/node_modules/rxjs/_esm5/README.md +147 -0
- package/test/cypress/node_modules/rxjs/src/README.md +147 -0
- package/test/cypress/node_modules/safe-buffer/README.md +584 -0
- package/test/cypress/node_modules/safer-buffer/README.md +156 -0
- package/test/cypress/node_modules/semver/README.md +566 -0
- package/test/cypress/node_modules/shebang-command/README.md +34 -0
- package/test/cypress/node_modules/shebang-regex/README.md +33 -0
- package/test/cypress/node_modules/signal-exit/README.md +39 -0
- package/test/cypress/node_modules/slice-ansi/README.md +72 -0
- package/test/cypress/node_modules/sshpk/README.md +804 -0
- package/test/cypress/node_modules/string-width/README.md +50 -0
- package/test/cypress/node_modules/strip-ansi/README.md +46 -0
- package/test/cypress/node_modules/strip-final-newline/README.md +30 -0
- package/test/cypress/node_modules/supports-color/README.md +77 -0
- package/test/cypress/node_modules/throttleit/README.md +32 -0
- package/test/cypress/node_modules/tmp/README.md +365 -0
- package/test/cypress/node_modules/tough-cookie/README.md +527 -0
- package/test/cypress/node_modules/tslib/README.md +142 -0
- package/test/cypress/node_modules/tunnel-agent/README.md +4 -0
- package/test/cypress/node_modules/tweetnacl/README.md +459 -0
- package/test/cypress/node_modules/type-fest/README.md +760 -0
- package/test/cypress/node_modules/universalify/README.md +76 -0
- package/test/cypress/node_modules/untildify/README.md +30 -0
- package/test/cypress/node_modules/uuid/README.md +505 -0
- package/test/cypress/node_modules/verror/README.md +528 -0
- package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +46 -0
- package/test/cypress/node_modules/which/README.md +54 -0
- package/test/cypress/node_modules/wrap-ansi/README.md +91 -0
- package/test/cypress/node_modules/wrappy/README.md +36 -0
- package/test/cypress/node_modules/yallist/README.md +204 -0
- package/test/cypress/node_modules/yauzl/README.md +658 -0
- package/.browserslistrc +0 -12
- package/.codecov.yml +0 -17
- package/.editorconfig +0 -18
- package/.eslintrc.json +0 -50
- package/.github/CODE_OF_CONDUCT.md +0 -76
- package/.github/FUNDING.yml +0 -8
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -54
- package/.github/ISSUE_TEMPLATE/config.yml +0 -5
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -44
- package/.github/renovate.json5 +0 -26
- package/.github/stale.yml +0 -7
- package/.github/workflows/main.yml +0 -83
- package/.vscode/extensions.json +0 -9
- package/.vscode/launch.json +0 -72
- package/.vscode/settings.json +0 -7
- package/.vscode/tasks.json +0 -77
- package/CHANGELOG.md +0 -1172
- package/angular.json +0 -148
- package/dist/LICENSE +0 -20
- package/dist/README.md +0 -182
- package/dist/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +0 -1171
- package/dist/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +0 -300
- package/dist/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +0 -46
- package/dist/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +0 -26
- package/dist/fesm2015/angular-slickgrid.mjs.map +0 -1
- package/dist/fesm2020/angular-slickgrid.mjs.map +0 -1
- package/dist/package.json +0 -79
- package/global.d.ts +0 -1
- package/ngcc.config.js +0 -13
- package/screenshots/column-picker.png +0 -0
- package/screenshots/composite-editor.png +0 -0
- package/screenshots/draggable-grouping.png +0 -0
- package/screenshots/editors.png +0 -0
- package/screenshots/export-to-file.png +0 -0
- package/screenshots/filter_and_sort.png +0 -0
- package/screenshots/formatters.png +0 -0
- package/screenshots/frozen.png +0 -0
- package/screenshots/multipleSelectFilter.png +0 -0
- package/screenshots/pagination.png +0 -0
- package/screenshots/selectFilter.png +0 -0
- package/screenshots/singleFilter.png +0 -0
- package/src/app/app-routing.module.ts +0 -83
- package/src/app/app.component.html +0 -160
- package/src/app/app.component.scss +0 -65
- package/src/app/app.component.ts +0 -10
- package/src/app/app.module.ts +0 -175
- package/src/app/examples/custom-angularComponentEditor.ts +0 -184
- package/src/app/examples/custom-angularComponentFilter.ts +0 -126
- package/src/app/examples/custom-inputEditor.ts +0 -124
- package/src/app/examples/custom-inputFilter.ts +0 -142
- package/src/app/examples/custom-titleFormatter.component.ts +0 -8
- package/src/app/examples/editor-ng-select.component.ts +0 -37
- package/src/app/examples/filter-ng-select.component.ts +0 -32
- package/src/app/examples/grid-additem.component.html +0 -48
- package/src/app/examples/grid-additem.component.ts +0 -272
- package/src/app/examples/grid-angular.component.html +0 -79
- package/src/app/examples/grid-angular.component.scss +0 -28
- package/src/app/examples/grid-angular.component.ts +0 -370
- package/src/app/examples/grid-autoheight.component.html +0 -52
- package/src/app/examples/grid-autoheight.component.ts +0 -147
- package/src/app/examples/grid-basic.component.html +0 -29
- package/src/app/examples/grid-basic.component.ts +0 -82
- package/src/app/examples/grid-clientside.component.html +0 -51
- package/src/app/examples/grid-clientside.component.ts +0 -293
- package/src/app/examples/grid-colspan.component.html +0 -39
- package/src/app/examples/grid-colspan.component.scss +0 -11
- package/src/app/examples/grid-colspan.component.ts +0 -155
- package/src/app/examples/grid-composite-editor.component.html +0 -79
- package/src/app/examples/grid-composite-editor.component.scss +0 -19
- package/src/app/examples/grid-composite-editor.component.ts +0 -948
- package/src/app/examples/grid-contextmenu.component.html +0 -62
- package/src/app/examples/grid-contextmenu.component.scss +0 -44
- package/src/app/examples/grid-contextmenu.component.ts +0 -473
- package/src/app/examples/grid-custom-tooltip.component.html +0 -25
- package/src/app/examples/grid-custom-tooltip.component.scss +0 -77
- package/src/app/examples/grid-custom-tooltip.component.ts +0 -483
- package/src/app/examples/grid-draggrouping.component.html +0 -93
- package/src/app/examples/grid-draggrouping.component.ts +0 -397
- package/src/app/examples/grid-editor.component.html +0 -88
- package/src/app/examples/grid-editor.component.ts +0 -699
- package/src/app/examples/grid-formatter.component.html +0 -26
- package/src/app/examples/grid-formatter.component.ts +0 -162
- package/src/app/examples/grid-frozen.component.html +0 -65
- package/src/app/examples/grid-frozen.component.scss +0 -11
- package/src/app/examples/grid-frozen.component.ts +0 -303
- package/src/app/examples/grid-graphql-nopage.component.html +0 -33
- package/src/app/examples/grid-graphql-nopage.component.scss +0 -9
- package/src/app/examples/grid-graphql-nopage.component.ts +0 -242
- package/src/app/examples/grid-graphql.component.html +0 -87
- package/src/app/examples/grid-graphql.component.ts +0 -304
- package/src/app/examples/grid-grouping.component.html +0 -80
- package/src/app/examples/grid-grouping.component.ts +0 -313
- package/src/app/examples/grid-headerbutton.component.html +0 -31
- package/src/app/examples/grid-headerbutton.component.scss +0 -10
- package/src/app/examples/grid-headerbutton.component.ts +0 -233
- package/src/app/examples/grid-headermenu.component.html +0 -31
- package/src/app/examples/grid-headermenu.component.scss +0 -25
- package/src/app/examples/grid-headermenu.component.ts +0 -159
- package/src/app/examples/grid-localization.component.html +0 -54
- package/src/app/examples/grid-localization.component.ts +0 -293
- package/src/app/examples/grid-menu.component.html +0 -37
- package/src/app/examples/grid-menu.component.scss +0 -28
- package/src/app/examples/grid-menu.component.ts +0 -229
- package/src/app/examples/grid-odata.component.html +0 -116
- package/src/app/examples/grid-odata.component.ts +0 -441
- package/src/app/examples/grid-range.component.html +0 -74
- package/src/app/examples/grid-range.component.ts +0 -291
- package/src/app/examples/grid-remote.component.html +0 -37
- package/src/app/examples/grid-remote.component.ts +0 -153
- package/src/app/examples/grid-resize-by-content.component.html +0 -62
- package/src/app/examples/grid-resize-by-content.component.scss +0 -19
- package/src/app/examples/grid-resize-by-content.component.ts +0 -780
- package/src/app/examples/grid-rowdetail.component.html +0 -35
- package/src/app/examples/grid-rowdetail.component.ts +0 -205
- package/src/app/examples/grid-rowmove.component.html +0 -49
- package/src/app/examples/grid-rowmove.component.ts +0 -234
- package/src/app/examples/grid-rowselection.component.html +0 -76
- package/src/app/examples/grid-rowselection.component.ts +0 -267
- package/src/app/examples/grid-state.component.html +0 -36
- package/src/app/examples/grid-state.component.ts +0 -259
- package/src/app/examples/grid-tabs.component.html +0 -35
- package/src/app/examples/grid-tabs.component.ts +0 -115
- package/src/app/examples/grid-trading.component.html +0 -58
- package/src/app/examples/grid-trading.component.scss +0 -49
- package/src/app/examples/grid-trading.component.ts +0 -319
- package/src/app/examples/grid-tree-data-hierarchical.component.html +0 -79
- package/src/app/examples/grid-tree-data-hierarchical.component.scss +0 -47
- package/src/app/examples/grid-tree-data-hierarchical.component.ts +0 -311
- package/src/app/examples/grid-tree-data-parent-child.component.html +0 -108
- package/src/app/examples/grid-tree-data-parent-child.component.scss +0 -10
- package/src/app/examples/grid-tree-data-parent-child.component.ts +0 -351
- package/src/app/examples/home.component.html +0 -41
- package/src/app/examples/home.component.ts +0 -9
- package/src/app/examples/rowdetail-preload.component.ts +0 -10
- package/src/app/examples/rowdetail-view.component.html +0 -36
- package/src/app/examples/rowdetail-view.component.ts +0 -54
- package/src/app/examples/swt-common-grid-pagination.component.ts +0 -156
- package/src/app/examples/swt-common-grid-test.component.html +0 -30
- package/src/app/examples/swt-common-grid-test.component.ts +0 -219
- package/src/app/examples/swt-common-grid.component.ts +0 -436
- package/src/app/examples/swt-logger.service.ts +0 -165
- package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.html +0 -4
- package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts +0 -1395
- package/src/app/modules/angular-slickgrid/constants.ts +0 -97
- package/src/app/modules/angular-slickgrid/extensions/index.ts +0 -1
- package/src/app/modules/angular-slickgrid/extensions/slickRowDetailView.ts +0 -375
- package/src/app/modules/angular-slickgrid/global-grid-options.ts +0 -245
- package/src/app/modules/angular-slickgrid/index.ts +0 -11
- package/src/app/modules/angular-slickgrid/models/angularComponentOutput.interface.ts +0 -6
- package/src/app/modules/angular-slickgrid/models/angularGridInstance.interface.ts +0 -68
- package/src/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.ts +0 -37
- package/src/app/modules/angular-slickgrid/models/gridOption.interface.ts +0 -12
- package/src/app/modules/angular-slickgrid/models/index.ts +0 -6
- package/src/app/modules/angular-slickgrid/models/rowDetailView.interface.ts +0 -33
- package/src/app/modules/angular-slickgrid/models/slickGrid.interface.ts +0 -7
- package/src/app/modules/angular-slickgrid/modules/angular-slickgrid.module.ts +0 -37
- package/src/app/modules/angular-slickgrid/services/angularUtil.service.ts +0 -48
- package/src/app/modules/angular-slickgrid/services/bsDropdown.service.ts +0 -142
- package/src/app/modules/angular-slickgrid/services/container.service.ts +0 -24
- package/src/app/modules/angular-slickgrid/services/index.ts +0 -5
- package/src/app/modules/angular-slickgrid/services/translater.service.ts +0 -38
- package/src/app/modules/angular-slickgrid/services/utilities.ts +0 -19
- package/src/app/modules/angular-slickgrid/slickgrid-config.ts +0 -10
- package/src/app/slickgrid-custom-variables.scss +0 -10
- package/src/assets/.gitkeep +0 -0
- package/src/assets/data/collection_100_numbers.json +0 -12
- package/src/assets/data/collection_500_numbers.json +0 -52
- package/src/assets/data/countries.json +0 -245
- package/src/assets/data/country_names.json +0 -245
- package/src/assets/data/customers_100.json +0 -102
- package/src/assets/i18n/en.json +0 -90
- package/src/assets/i18n/fr.json +0 -91
- package/src/environments/environment.prod.ts +0 -3
- package/src/environments/environment.ts +0 -8
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -18
- package/src/main.ts +0 -13
- package/src/polyfills.ts +0 -52
- package/src/public_api.ts +0 -1
- package/src/styles.scss +0 -66
- package/src/typings.d.ts +0 -10
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -40
- package/tsconfig.spec.json +0 -23
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
AngularGridInstance,
|
|
5
|
-
Column,
|
|
6
|
-
FieldType,
|
|
7
|
-
Filters,
|
|
8
|
-
Formatters,
|
|
9
|
-
GridOption,
|
|
10
|
-
GridStateChange
|
|
11
|
-
} from './../modules/angular-slickgrid';
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
templateUrl: './grid-rowselection.component.html',
|
|
15
|
-
styles: ['.alert { padding: 8px; margin-bottom: 10px }', '.col-sm-1{ max-width: 70px }'],
|
|
16
|
-
})
|
|
17
|
-
export class GridRowSelectionComponent implements OnInit {
|
|
18
|
-
title = 'Example 10: Multiple Grids with Row Selection';
|
|
19
|
-
subTitle = `
|
|
20
|
-
Row selection, single or multi-select (<a href="https://github.com/ghiscoding/Angular-Slickgrid/wiki/Row-Selection" target="_blank">Wiki docs</a>).
|
|
21
|
-
<ul>
|
|
22
|
-
<li>Single Select, you can click on any cell to make the row active</li>
|
|
23
|
-
<li>Multiple Selections, you need to specifically click on the checkbox to make 1 or more selections</li>
|
|
24
|
-
<li>You can use "selectableOverride()" callback to override logic to display checkbox on every row (for example only show it every 2nd row)</li>
|
|
25
|
-
<li>NOTE: Any Row Selection(s) will be reset when using Pagination and changing Page (you will need to set it back manually if you want it back)</li>
|
|
26
|
-
</ul>
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
angularGrid1!: AngularGridInstance;
|
|
30
|
-
angularGrid2!: AngularGridInstance;
|
|
31
|
-
columnDefinitions1!: Column[];
|
|
32
|
-
columnDefinitions2!: Column[];
|
|
33
|
-
gridOptions1!: GridOption;
|
|
34
|
-
gridOptions2!: GridOption;
|
|
35
|
-
dataset1!: any[];
|
|
36
|
-
dataset2!: any[];
|
|
37
|
-
gridObj1!: any;
|
|
38
|
-
gridObj2!: any;
|
|
39
|
-
isGrid2WithPagination = true;
|
|
40
|
-
selectedTitles!: any[];
|
|
41
|
-
selectedTitle!: any;
|
|
42
|
-
selectedGrid2IDs!: number[];
|
|
43
|
-
|
|
44
|
-
constructor(private cd: ChangeDetectorRef) { }
|
|
45
|
-
|
|
46
|
-
ngOnInit(): void {
|
|
47
|
-
this.prepareGrid();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
angularGridReady1(angularGrid: AngularGridInstance) {
|
|
51
|
-
this.angularGrid1 = angularGrid;
|
|
52
|
-
this.gridObj1 = angularGrid && angularGrid.slickGrid || {};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
angularGridReady2(angularGrid: AngularGridInstance) {
|
|
56
|
-
this.angularGrid2 = angularGrid;
|
|
57
|
-
this.gridObj2 = angularGrid && angularGrid.slickGrid || {};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
prepareGrid() {
|
|
61
|
-
this.columnDefinitions1 = [
|
|
62
|
-
{ id: 'title', name: 'Title', field: 'title', sortable: true, type: FieldType.string, filterable: true },
|
|
63
|
-
{ id: 'duration', name: 'Duration (days)', field: 'duration', sortable: true, type: FieldType.number, filterable: true },
|
|
64
|
-
{ id: 'complete', name: '% Complete', field: 'percentComplete', formatter: Formatters.percentCompleteBar, type: FieldType.number, filterable: true, sortable: true },
|
|
65
|
-
{
|
|
66
|
-
id: 'start', name: 'Start', field: 'start',
|
|
67
|
-
formatter: Formatters.dateIso, exportWithFormatter: true, type: FieldType.date,
|
|
68
|
-
filterable: true, sortable: true, filter: { model: Filters.compoundDate },
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: 'finish', name: 'Finish', field: 'finish',
|
|
72
|
-
formatter: Formatters.dateIso, exportWithFormatter: true, type: FieldType.date,
|
|
73
|
-
filterable: true, sortable: true, filter: { model: Filters.compoundDate },
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven',
|
|
77
|
-
formatter: Formatters.checkmark, type: FieldType.boolean,
|
|
78
|
-
sortable: true, filterable: true,
|
|
79
|
-
filter: {
|
|
80
|
-
collection: [{ value: '', label: '' }, { value: true, label: 'true' }, { value: false, label: 'false' }],
|
|
81
|
-
model: Filters.singleSelect,
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
];
|
|
85
|
-
|
|
86
|
-
this.columnDefinitions2 = [
|
|
87
|
-
{ id: 'title', name: 'Title', field: 'title', sortable: true, type: FieldType.string, filterable: true },
|
|
88
|
-
{ id: 'duration', name: 'Duration (days)', field: 'duration', sortable: true, type: FieldType.number, filterable: true },
|
|
89
|
-
{ id: 'complete', name: '% Complete', field: 'percentComplete', formatter: Formatters.percentCompleteBar, type: FieldType.number, filterable: true, sortable: true },
|
|
90
|
-
{
|
|
91
|
-
id: 'start', name: 'Start', field: 'start',
|
|
92
|
-
formatter: Formatters.dateIso, exportWithFormatter: true, type: FieldType.date,
|
|
93
|
-
filterable: true, sortable: true, filter: { model: Filters.compoundDate },
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
id: 'finish', name: 'Finish', field: 'finish',
|
|
97
|
-
formatter: Formatters.dateIso, exportWithFormatter: true, type: FieldType.date,
|
|
98
|
-
filterable: true, sortable: true, filter: { model: Filters.compoundDate },
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven',
|
|
102
|
-
formatter: Formatters.checkmark, type: FieldType.boolean,
|
|
103
|
-
sortable: true, filterable: true,
|
|
104
|
-
filter: {
|
|
105
|
-
collection: [{ value: '', label: '' }, { value: true, label: 'true' }, { value: false, label: 'false' }],
|
|
106
|
-
model: Filters.singleSelect,
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
];
|
|
110
|
-
|
|
111
|
-
this.gridOptions1 = {
|
|
112
|
-
gridHeight: 225,
|
|
113
|
-
gridWidth: 800,
|
|
114
|
-
enableAutoResize: false,
|
|
115
|
-
enableCellNavigation: true,
|
|
116
|
-
enableRowSelection: true,
|
|
117
|
-
enableCheckboxSelector: true,
|
|
118
|
-
enableFiltering: true,
|
|
119
|
-
checkboxSelector: {
|
|
120
|
-
// optionally change the column index position of the icon (defaults to 0)
|
|
121
|
-
// columnIndexPosition: 1,
|
|
122
|
-
|
|
123
|
-
// remove the unnecessary "Select All" checkbox in header when in single selection mode
|
|
124
|
-
hideSelectAllCheckbox: true,
|
|
125
|
-
|
|
126
|
-
// you can override the logic for showing (or not) the expand icon
|
|
127
|
-
// for example, display the expand icon only on every 2nd row
|
|
128
|
-
// selectableOverride: (row: number, dataContext: any, grid: SlickGrid) => (dataContext.id % 2 === 1)
|
|
129
|
-
},
|
|
130
|
-
multiSelect: false,
|
|
131
|
-
rowSelectionOptions: {
|
|
132
|
-
// True (Single Selection), False (Multiple Selections)
|
|
133
|
-
selectActiveRow: true,
|
|
134
|
-
},
|
|
135
|
-
columnPicker: {
|
|
136
|
-
hideForceFitButton: true
|
|
137
|
-
},
|
|
138
|
-
gridMenu: {
|
|
139
|
-
hideForceFitButton: true
|
|
140
|
-
},
|
|
141
|
-
enablePagination: true,
|
|
142
|
-
pagination: {
|
|
143
|
-
pageSizes: [5, 10, 15, 20, 25, 50, 75, 100],
|
|
144
|
-
pageSize: 5
|
|
145
|
-
},
|
|
146
|
-
// we can use some Presets, for the example Pagination
|
|
147
|
-
presets: {
|
|
148
|
-
pagination: { pageNumber: 2, pageSize: 5 },
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
this.gridOptions2 = {
|
|
153
|
-
gridHeight: 255,
|
|
154
|
-
gridWidth: 800,
|
|
155
|
-
enableAutoResize: false,
|
|
156
|
-
enableCellNavigation: true,
|
|
157
|
-
enableFiltering: true,
|
|
158
|
-
checkboxSelector: {
|
|
159
|
-
// you can toggle these 2 properties to show the "select all" checkbox in different location
|
|
160
|
-
hideInFilterHeaderRow: false,
|
|
161
|
-
hideInColumnTitleRow: true
|
|
162
|
-
},
|
|
163
|
-
rowSelectionOptions: {
|
|
164
|
-
// True (Single Selection), False (Multiple Selections)
|
|
165
|
-
selectActiveRow: false
|
|
166
|
-
},
|
|
167
|
-
enableCheckboxSelector: true,
|
|
168
|
-
enableRowSelection: true,
|
|
169
|
-
enablePagination: true,
|
|
170
|
-
pagination: {
|
|
171
|
-
pageSizes: [5, 10, 15, 20, 25, 50, 75, 100],
|
|
172
|
-
pageSize: 5
|
|
173
|
-
},
|
|
174
|
-
// 1. pre-select some grid row indexes (less recommended, better use the Presets, see below)
|
|
175
|
-
// preselectedRows: [0, 2],
|
|
176
|
-
|
|
177
|
-
// 2. or use the Presets to pre-select some rows
|
|
178
|
-
presets: {
|
|
179
|
-
// you can presets row selection here as well, you can choose 1 of the following 2 ways of setting the selection
|
|
180
|
-
// by their index position in the grid (UI) or by the object IDs, the default is "dataContextIds" and if provided it will use it and disregard "gridRowIndexes"
|
|
181
|
-
// the RECOMMENDED is to use "dataContextIds" since that will always work even with Pagination, while "gridRowIndexes" is only good for 1 page
|
|
182
|
-
rowSelection: {
|
|
183
|
-
// gridRowIndexes: [2], // the row position of what you see on the screen (UI)
|
|
184
|
-
dataContextIds: [3, 12, 13, 522] // (recommended) select by your data object IDs
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
this.dataset1 = this.prepareData(495);
|
|
190
|
-
this.dataset2 = this.prepareData(525);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
prepareData(count: number) {
|
|
194
|
-
// mock a dataset
|
|
195
|
-
const mockDataset = [];
|
|
196
|
-
for (let i = 0; i < count; i++) {
|
|
197
|
-
const randomYear = 2000 + Math.floor(Math.random() * 10);
|
|
198
|
-
const randomMonth = Math.floor(Math.random() * 11);
|
|
199
|
-
const randomDay = Math.floor((Math.random() * 29));
|
|
200
|
-
const randomPercent = Math.round(Math.random() * 100);
|
|
201
|
-
|
|
202
|
-
mockDataset[i] = {
|
|
203
|
-
id: i,
|
|
204
|
-
title: 'Task ' + i,
|
|
205
|
-
duration: Math.round(Math.random() * 100) + '',
|
|
206
|
-
percentComplete: randomPercent,
|
|
207
|
-
percentCompleteNumber: randomPercent,
|
|
208
|
-
start: new Date(randomYear, randomMonth, randomDay),
|
|
209
|
-
finish: new Date(randomYear, (randomMonth + 1), randomDay),
|
|
210
|
-
effortDriven: (i % 5 === 0)
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
return mockDataset;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
goToGrid1FirstPage() {
|
|
217
|
-
this.angularGrid1.paginationService!.goToFirstPage();
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
goToGrid1LastPage() {
|
|
221
|
-
this.angularGrid1.paginationService!.goToLastPage();
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
goToGrid2FirstPage() {
|
|
225
|
-
this.angularGrid2.paginationService!.goToFirstPage();
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
goToGrid2LastPage() {
|
|
229
|
-
this.angularGrid2.paginationService!.goToLastPage();
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/** Dispatched event of a Grid State Changed event */
|
|
233
|
-
grid1StateChanged(gridStateChanges: GridStateChange) {
|
|
234
|
-
console.log('Grid State changed:: ', gridStateChanges);
|
|
235
|
-
console.log('Grid State changed:: ', gridStateChanges.change);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/** Dispatched event of a Grid State Changed event */
|
|
239
|
-
grid2StateChanged(gridStateChanges: GridStateChange) {
|
|
240
|
-
console.log('Grid State changed:: ', gridStateChanges);
|
|
241
|
-
console.log('Grid State changed:: ', gridStateChanges.change);
|
|
242
|
-
|
|
243
|
-
if (gridStateChanges!.gridState!.rowSelection) {
|
|
244
|
-
this.selectedGrid2IDs = (gridStateChanges!.gridState!.rowSelection.filteredDataContextIds || []) as number[];
|
|
245
|
-
this.selectedGrid2IDs = this.selectedGrid2IDs.sort((a, b) => a - b); // sort by ID
|
|
246
|
-
this.selectedTitles = this.selectedGrid2IDs.map(dataContextId => `Task ${dataContextId}`);
|
|
247
|
-
this.cd.detectChanges();
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
// Toggle the Pagination of Grid2
|
|
252
|
-
// IMPORTANT, the Pagination MUST BE CREATED on initial page load before you can start toggling it
|
|
253
|
-
// Basically you cannot toggle a Pagination that doesn't exist (must created at the time as the grid)
|
|
254
|
-
togglePaginationGrid2() {
|
|
255
|
-
this.isGrid2WithPagination = !this.isGrid2WithPagination;
|
|
256
|
-
this.angularGrid2.paginationService!.togglePaginationVisibility(this.isGrid2WithPagination);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
handleSelectedRowsChanged1(e: Event, args: any) {
|
|
260
|
-
if (Array.isArray(args.rows) && this.gridObj1) {
|
|
261
|
-
this.selectedTitle = args.rows.map((idx: number) => {
|
|
262
|
-
const item = this.gridObj1.getDataItem(idx);
|
|
263
|
-
return item.title || '';
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<div id="demo-container" class="container-fluid">
|
|
2
|
-
<h2>
|
|
3
|
-
{{title}}
|
|
4
|
-
<span class="float-end">
|
|
5
|
-
<a style="font-size: 18px"
|
|
6
|
-
target="_blank"
|
|
7
|
-
href="https://github.com/ghiscoding/Angular-Slickgrid/blob/master/src/app/examples/grid-state.component.ts">
|
|
8
|
-
<span class="fa fa-link"></span> code
|
|
9
|
-
</a>
|
|
10
|
-
</span>
|
|
11
|
-
</h2>
|
|
12
|
-
<div class="subtitle" [innerHTML]="subTitle"></div>
|
|
13
|
-
|
|
14
|
-
<button class="btn btn-outline-secondary btn-sm" data-test="reset-button" (click)="clearGridStateFromLocalStorage()">
|
|
15
|
-
<i class="fa fa-times"></i>
|
|
16
|
-
Clear Grid State from Local Storage & Reset Grid
|
|
17
|
-
</button>
|
|
18
|
-
|
|
19
|
-
<button class="btn btn-outline-secondary btn-sm" (click)="switchLanguage()" data-test="language-button">
|
|
20
|
-
<i class="fa fa-language"></i>
|
|
21
|
-
Switch Language
|
|
22
|
-
</button>
|
|
23
|
-
<b>Locale:</b>
|
|
24
|
-
<span style="font-style: italic" data-test="selected-locale">
|
|
25
|
-
{{selectedLanguage + '.json'}}
|
|
26
|
-
</span>
|
|
27
|
-
|
|
28
|
-
<angular-slickgrid gridId="grid16"
|
|
29
|
-
[columnDefinitions]="columnDefinitions"
|
|
30
|
-
[gridOptions]="gridOptions"
|
|
31
|
-
[dataset]="dataset"
|
|
32
|
-
(onAngularGridCreated)="angularGridReady($event.detail)"
|
|
33
|
-
(onGridStateChanged)="gridStateChanged($event.detail)"
|
|
34
|
-
(onBeforeGridDestroy)="saveCurrentGridState()">
|
|
35
|
-
</angular-slickgrid>
|
|
36
|
-
</div>
|
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { Subscription } from 'rxjs';
|
|
4
|
-
import {
|
|
5
|
-
AngularGridInstance,
|
|
6
|
-
Column,
|
|
7
|
-
FieldType,
|
|
8
|
-
Filters,
|
|
9
|
-
Formatters,
|
|
10
|
-
GridOption,
|
|
11
|
-
GridState,
|
|
12
|
-
GridStateChange,
|
|
13
|
-
MultipleSelectOption,
|
|
14
|
-
unsubscribeAllObservables
|
|
15
|
-
} from './../modules/angular-slickgrid';
|
|
16
|
-
|
|
17
|
-
function randomBetween(min: number, max: number) {
|
|
18
|
-
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
19
|
-
}
|
|
20
|
-
const DEFAULT_PAGE_SIZE = 25;
|
|
21
|
-
const LOCAL_STORAGE_KEY = 'gridState';
|
|
22
|
-
const NB_ITEMS = 500;
|
|
23
|
-
|
|
24
|
-
@Component({
|
|
25
|
-
templateUrl: './grid-state.component.html'
|
|
26
|
-
})
|
|
27
|
-
export class GridStateComponent implements OnInit, OnDestroy {
|
|
28
|
-
title = 'Example 16: Grid State & Presets using Local Storage';
|
|
29
|
-
subTitle = `
|
|
30
|
-
Grid State & Preset (<a href="https://github.com/ghiscoding/Angular-Slickgrid/wiki/Grid-State-&-Preset" target="_blank">Wiki docs</a>)
|
|
31
|
-
<br/>
|
|
32
|
-
<ul class="small">
|
|
33
|
-
<li>Uses Local Storage to persist the Grid State and uses Grid Options "presets" to put the grid back to it's previous state</li>
|
|
34
|
-
<ul>
|
|
35
|
-
<li>to demo this, simply change any columns (position reorder, visibility, size, filter, sort), then refresh your browser with (F5)</li>
|
|
36
|
-
</ul>
|
|
37
|
-
<li>Local Storage is just one option, you can use whichever is more convenient for you (Local Storage, Session Storage, DB, ...)</li>
|
|
38
|
-
</ul>
|
|
39
|
-
`;
|
|
40
|
-
private subscriptions: Subscription[] = [];
|
|
41
|
-
angularGrid!: AngularGridInstance;
|
|
42
|
-
columnDefinitions!: Column[];
|
|
43
|
-
gridOptions!: GridOption;
|
|
44
|
-
dataset!: any[];
|
|
45
|
-
selectedLanguage: string;
|
|
46
|
-
|
|
47
|
-
constructor(private translate: TranslateService) {
|
|
48
|
-
this.selectedLanguage = this.translate.getDefaultLang();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
52
|
-
this.angularGrid = angularGrid;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ngOnDestroy() {
|
|
56
|
-
// also unsubscribe all Angular Subscriptions
|
|
57
|
-
this.subscriptions = unsubscribeAllObservables(this.subscriptions);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
ngOnInit(): void {
|
|
61
|
-
const presets = JSON.parse(localStorage[LOCAL_STORAGE_KEY] || null);
|
|
62
|
-
|
|
63
|
-
// use some Grid State preset defaults if you wish or just restore from Locale Storage
|
|
64
|
-
// presets = presets || this.useDefaultPresets();
|
|
65
|
-
this.defineGrid(presets);
|
|
66
|
-
|
|
67
|
-
// always start with English for Cypress E2E tests to be consistent
|
|
68
|
-
const defaultLang = 'en';
|
|
69
|
-
this.translate.use(defaultLang);
|
|
70
|
-
this.selectedLanguage = defaultLang;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/** Clear the Grid State from Local Storage and reset the grid to it's original state */
|
|
74
|
-
clearGridStateFromLocalStorage() {
|
|
75
|
-
localStorage[LOCAL_STORAGE_KEY] = null;
|
|
76
|
-
this.angularGrid.gridService.resetGrid(this.columnDefinitions);
|
|
77
|
-
this.angularGrid.paginationService!.changeItemPerPage(DEFAULT_PAGE_SIZE);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Define grid Options and Columns */
|
|
81
|
-
defineGrid(gridStatePresets?: GridState) {
|
|
82
|
-
// prepare a multiple-select array to filter with
|
|
83
|
-
const multiSelectFilterArray = [];
|
|
84
|
-
for (let i = 0; i < NB_ITEMS; i++) {
|
|
85
|
-
multiSelectFilterArray.push({ value: i, label: i });
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
this.columnDefinitions = [
|
|
89
|
-
{
|
|
90
|
-
id: 'title',
|
|
91
|
-
name: 'Title',
|
|
92
|
-
field: 'title',
|
|
93
|
-
nameKey: 'TITLE',
|
|
94
|
-
filterable: true,
|
|
95
|
-
sortable: true,
|
|
96
|
-
type: FieldType.string,
|
|
97
|
-
minWidth: 45, width: 100,
|
|
98
|
-
filter: {
|
|
99
|
-
model: Filters.compoundInput
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
id: 'description', name: 'Description', field: 'description', filterable: true, sortable: true, minWidth: 80, width: 100,
|
|
104
|
-
type: FieldType.string,
|
|
105
|
-
filter: {
|
|
106
|
-
model: Filters.input
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: 'duration', name: 'Duration (days)', field: 'duration', sortable: true, type: FieldType.number, exportCsvForceToKeepAsString: true,
|
|
111
|
-
minWidth: 55, width: 100,
|
|
112
|
-
nameKey: 'DURATION',
|
|
113
|
-
filterable: true,
|
|
114
|
-
filter: {
|
|
115
|
-
collection: multiSelectFilterArray,
|
|
116
|
-
model: Filters.multipleSelect,
|
|
117
|
-
// we could add certain option(s) to the "multiple-select" plugin
|
|
118
|
-
filterOptions: {
|
|
119
|
-
maxHeight: 250,
|
|
120
|
-
width: 175
|
|
121
|
-
} as MultipleSelectOption
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
id: 'complete', name: '% Complete', field: 'percentComplete', nameKey: 'PERCENT_COMPLETE', minWidth: 70, type: FieldType.number, sortable: true, width: 100,
|
|
126
|
-
formatter: Formatters.percentCompleteBar, filterable: true, filter: { model: Filters.slider, operator: '>' }
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
id: 'start', name: 'Start', field: 'start', nameKey: 'START', formatter: Formatters.dateIso, sortable: true, minWidth: 75, exportWithFormatter: true, width: 100,
|
|
130
|
-
type: FieldType.date, filterable: true, filter: { model: Filters.compoundDate }
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
id: 'completed', field: 'completed', nameKey: 'COMPLETED', minWidth: 85, maxWidth: 85, formatter: Formatters.checkmark, width: 100,
|
|
134
|
-
type: FieldType.boolean,
|
|
135
|
-
sortable: true,
|
|
136
|
-
filterable: true,
|
|
137
|
-
filter: {
|
|
138
|
-
collection: [{ value: '', label: '' }, { value: true, label: 'True' }, { value: false, label: 'False' }],
|
|
139
|
-
model: Filters.singleSelect,
|
|
140
|
-
|
|
141
|
-
// we could add certain option(s) to the "multiple-select" plugin
|
|
142
|
-
filterOptions: { autoDropWidth: true } as MultipleSelectOption,
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
];
|
|
146
|
-
|
|
147
|
-
this.gridOptions = {
|
|
148
|
-
autoResize: {
|
|
149
|
-
container: '#demo-container',
|
|
150
|
-
rightPadding: 10
|
|
151
|
-
},
|
|
152
|
-
enableCheckboxSelector: true,
|
|
153
|
-
enableFiltering: true,
|
|
154
|
-
enableTranslate: true,
|
|
155
|
-
i18n: this.translate,
|
|
156
|
-
columnPicker: {
|
|
157
|
-
hideForceFitButton: true
|
|
158
|
-
},
|
|
159
|
-
gridMenu: {
|
|
160
|
-
hideForceFitButton: true,
|
|
161
|
-
hideClearFrozenColumnsCommand: false,
|
|
162
|
-
},
|
|
163
|
-
headerMenu: {
|
|
164
|
-
hideFreezeColumnsCommand: false,
|
|
165
|
-
},
|
|
166
|
-
enablePagination: true,
|
|
167
|
-
pagination: {
|
|
168
|
-
pageSizes: [5, 10, 15, 20, 25, 30, 40, 50, 75, 100],
|
|
169
|
-
pageSize: DEFAULT_PAGE_SIZE
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
// reload the Grid State with the grid options presets
|
|
174
|
-
if (gridStatePresets) {
|
|
175
|
-
this.gridOptions.presets = gridStatePresets;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
this.dataset = this.getData(NB_ITEMS);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
getData(count: number) {
|
|
182
|
-
// mock a dataset
|
|
183
|
-
const tmpData = [];
|
|
184
|
-
for (let i = 0; i < count; i++) {
|
|
185
|
-
const randomDuration = Math.round(Math.random() * 100);
|
|
186
|
-
const randomYear = randomBetween(2000, 2025);
|
|
187
|
-
const randomYearShort = randomBetween(10, 25);
|
|
188
|
-
const randomMonth = randomBetween(1, 12);
|
|
189
|
-
const randomMonthStr = (randomMonth < 10) ? `0${randomMonth}` : randomMonth;
|
|
190
|
-
const randomDay = randomBetween(10, 28);
|
|
191
|
-
const randomPercent = randomBetween(0, 100);
|
|
192
|
-
const randomHour = randomBetween(10, 23);
|
|
193
|
-
const randomTime = randomBetween(10, 59);
|
|
194
|
-
|
|
195
|
-
tmpData[i] = {
|
|
196
|
-
id: i,
|
|
197
|
-
title: 'Task ' + i,
|
|
198
|
-
etc: 'Something hidden ' + i,
|
|
199
|
-
description: (i % 5) ? 'desc ' + i : null, // also add some random to test NULL field
|
|
200
|
-
duration: randomDuration,
|
|
201
|
-
percentComplete: randomPercent,
|
|
202
|
-
percentCompleteNumber: randomPercent,
|
|
203
|
-
start: new Date(randomYear, randomMonth, randomDay), // provide a Date format
|
|
204
|
-
usDateShort: `${randomMonth}/${randomDay}/${randomYearShort}`, // provide a date US Short in the dataset
|
|
205
|
-
utcDate: `${randomYear}-${randomMonthStr}-${randomDay}T${randomHour}:${randomTime}:${randomTime}Z`,
|
|
206
|
-
completed: (i % 3 === 0)
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
return tmpData;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/** Dispatched event of a Grid State Changed event */
|
|
213
|
-
gridStateChanged(gridStateChanges: GridStateChange) {
|
|
214
|
-
console.log('Client sample, Grid State changed:: ', gridStateChanges);
|
|
215
|
-
localStorage[LOCAL_STORAGE_KEY] = JSON.stringify(gridStateChanges.gridState);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/** Save current Filters, Sorters in LocaleStorage or DB */
|
|
219
|
-
saveCurrentGridState() {
|
|
220
|
-
const gridState: GridState = this.angularGrid.gridStateService.getCurrentGridState();
|
|
221
|
-
console.log('Client sample, last Grid State:: ', gridState);
|
|
222
|
-
localStorage[LOCAL_STORAGE_KEY] = JSON.stringify(gridState);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
switchLanguage() {
|
|
226
|
-
const nextLanguage = (this.selectedLanguage === 'en') ? 'fr' : 'en';
|
|
227
|
-
this.subscriptions.push(
|
|
228
|
-
this.translate.use(nextLanguage).subscribe(() => {
|
|
229
|
-
this.selectedLanguage = nextLanguage;
|
|
230
|
-
})
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
useDefaultPresets() {
|
|
235
|
-
// use columnDef searchTerms OR use presets as shown below
|
|
236
|
-
return {
|
|
237
|
-
columns: [
|
|
238
|
-
{ columnId: 'description', width: 170 }, // flip column position of Title/Description to Description/Title
|
|
239
|
-
{ columnId: 'title', width: 55 },
|
|
240
|
-
{ columnId: 'duration' },
|
|
241
|
-
{ columnId: 'complete' },
|
|
242
|
-
{ columnId: 'start' },
|
|
243
|
-
{ columnId: 'usDateShort' },
|
|
244
|
-
{ columnId: 'utcDate' },
|
|
245
|
-
// { columnId: 'completed' }, // to HIDE a column, simply ommit it from the preset array
|
|
246
|
-
],
|
|
247
|
-
filters: [
|
|
248
|
-
{ columnId: 'duration', searchTerms: [2, 22, 44] },
|
|
249
|
-
// { columnId: 'complete', searchTerms: ['5'], operator: '>' },
|
|
250
|
-
{ columnId: 'usDateShort', operator: '<', searchTerms: ['4/20/25'] },
|
|
251
|
-
// { columnId: 'completed', searchTerms: [true] }
|
|
252
|
-
],
|
|
253
|
-
sorters: [
|
|
254
|
-
{ columnId: 'duration', direction: 'DESC' },
|
|
255
|
-
{ columnId: 'complete', direction: 'ASC' }
|
|
256
|
-
],
|
|
257
|
-
} as GridState;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<div class="container-fluid">
|
|
2
|
-
<h2>
|
|
3
|
-
{{title}}
|
|
4
|
-
<span class="float-end">
|
|
5
|
-
<a style="font-size: 18px"
|
|
6
|
-
target="_blank"
|
|
7
|
-
href="https://github.com/ghiscoding/Angular-Slickgrid/blob/master/src/app/examples/grid-tabs.component.ts">
|
|
8
|
-
<span class="fa fa-link"></span> code
|
|
9
|
-
</a>
|
|
10
|
-
</span>
|
|
11
|
-
</h2>
|
|
12
|
-
<div class="subtitle" [innerHTML]="subTitle"></div>
|
|
13
|
-
|
|
14
|
-
<div>
|
|
15
|
-
<tabset>
|
|
16
|
-
<tab heading="Javascript" id="javascript" data-test="javascript-tab">
|
|
17
|
-
<h4>Grid 1 - Load Local Data</h4>
|
|
18
|
-
<angular-slickgrid gridId="grid1"
|
|
19
|
-
[columnDefinitions]="columnDefinitions1"
|
|
20
|
-
[gridOptions]="gridOptions1"
|
|
21
|
-
[dataset]="dataset1">
|
|
22
|
-
</angular-slickgrid>
|
|
23
|
-
</tab>
|
|
24
|
-
<tab heading="Http-Client" data-test="http-tab" (selectTab)="resizeGrid2()">
|
|
25
|
-
<h4>Grid 2 - Load a JSON dataset through Http-Client</h4>
|
|
26
|
-
<angular-slickgrid gridId="grid2"
|
|
27
|
-
[columnDefinitions]="columnDefinitions2"
|
|
28
|
-
[gridOptions]="gridOptions2"
|
|
29
|
-
[dataset]="dataset2"
|
|
30
|
-
(onAngularGridCreated)="angularGrid2Ready($event.detail)">
|
|
31
|
-
</angular-slickgrid>
|
|
32
|
-
</tab>
|
|
33
|
-
</tabset>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|