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,291 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { CustomInputFilter } from './custom-inputFilter';
|
|
4
|
-
import {
|
|
5
|
-
AngularGridInstance,
|
|
6
|
-
Column,
|
|
7
|
-
FieldType,
|
|
8
|
-
Filters,
|
|
9
|
-
Formatter,
|
|
10
|
-
Formatters,
|
|
11
|
-
GridOption,
|
|
12
|
-
GridStateChange,
|
|
13
|
-
JQueryUiSliderOption,
|
|
14
|
-
Metrics,
|
|
15
|
-
MultipleSelectOption,
|
|
16
|
-
OperatorType,
|
|
17
|
-
unsubscribeAllObservables,
|
|
18
|
-
} from '../modules/angular-slickgrid';
|
|
19
|
-
import * as moment from 'moment-mini';
|
|
20
|
-
import { Subscription } from 'rxjs';
|
|
21
|
-
|
|
22
|
-
const NB_ITEMS = 1500;
|
|
23
|
-
|
|
24
|
-
function randomBetween(min: number, max: number): number {
|
|
25
|
-
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// create a custom translate Formatter (typically you would move that a separate file, for separation of concerns)
|
|
29
|
-
const taskTranslateFormatter: Formatter = (row, cell, value, columnDef, dataContext, grid) => {
|
|
30
|
-
const gridOptions = grid?.getOptions?.() as GridOption;
|
|
31
|
-
const translate = gridOptions.i18n as TranslateService;
|
|
32
|
-
|
|
33
|
-
return translate.instant('TASK_X', { x: value });
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
@Component({
|
|
37
|
-
templateUrl: './grid-range.component.html'
|
|
38
|
-
})
|
|
39
|
-
export class GridRangeComponent implements OnInit, OnDestroy {
|
|
40
|
-
title = 'Example 25: Filtering from Range of Search Values';
|
|
41
|
-
subTitle = `
|
|
42
|
-
This demo shows how to use Filters with Range of Search Values (<a href="https://github.com/ghiscoding/Angular-Slickgrid/wiki/Range-Filters" target="_blank">Wiki docs</a>)
|
|
43
|
-
<br/>
|
|
44
|
-
<ul class="small">
|
|
45
|
-
<li>All input filters support the following operators: (>, >=, <, <=, <>, !=, =, ==, *) and now also the (..) for an input range</li>
|
|
46
|
-
<li>All filters (which support ranges) can be defined via the 2 dots (..) which represents a range, this also works for dates and slider in the "presets"</li>
|
|
47
|
-
<ul>
|
|
48
|
-
<li>For a numeric range defined in an input filter (must be of type text), you can use 2 dots (..) to represent a range</li>
|
|
49
|
-
<li>example: typing "10..90" will filter values between 10 and 90 (but excluding the number 10 and 90)</li>
|
|
50
|
-
</ul>
|
|
51
|
-
<ul>
|
|
52
|
-
<li>note that the examples shown below for the operator, are case sensitive</li>
|
|
53
|
-
<li>by default the range is inclusive which would be the same as defining the filter options to "operator: 'RangeInclusive'" or "operator: OperatoryType.rangeInclusive"</li>
|
|
54
|
-
<li>you can also set the inverse (exclusive) by defining the filter options to "operator: 'RangeExclusive'" or "operator: OperatoryType.rangeExclusive"</li>
|
|
55
|
-
</ul>
|
|
56
|
-
<li>Date Range with Flatpickr Date Picker, they will also use the locale, choose a start date then drag or click on the end date</li>
|
|
57
|
-
</ul>
|
|
58
|
-
`;
|
|
59
|
-
private subscriptions: Subscription[] = [];
|
|
60
|
-
angularGrid!: AngularGridInstance;
|
|
61
|
-
columnDefinitions!: Column[];
|
|
62
|
-
gridOptions!: GridOption;
|
|
63
|
-
dataset!: any[];
|
|
64
|
-
selectedLanguage: string;
|
|
65
|
-
metrics!: Metrics;
|
|
66
|
-
filterList = [
|
|
67
|
-
{ value: '', label: '' },
|
|
68
|
-
{ value: 'currentYearTasks', label: 'Current Year Completed Tasks' },
|
|
69
|
-
{ value: 'nextYearTasks', label: 'Next Year Active Tasks' }
|
|
70
|
-
];
|
|
71
|
-
selectedPredefinedFilter!: { value: string; label: string; };
|
|
72
|
-
|
|
73
|
-
constructor(private translate: TranslateService) {
|
|
74
|
-
// always start with English for Cypress E2E tests to be consistent
|
|
75
|
-
const defaultLang = 'en';
|
|
76
|
-
this.translate.use(defaultLang);
|
|
77
|
-
this.selectedLanguage = defaultLang;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
ngOnDestroy() {
|
|
81
|
-
// also unsubscribe all Angular Subscriptions
|
|
82
|
-
this.subscriptions = unsubscribeAllObservables(this.subscriptions);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
ngOnInit(): void {
|
|
86
|
-
this.columnDefinitions = [
|
|
87
|
-
{
|
|
88
|
-
id: 'title', name: 'Title', field: 'id', nameKey: 'TITLE', minWidth: 100,
|
|
89
|
-
formatter: taskTranslateFormatter,
|
|
90
|
-
sortable: true,
|
|
91
|
-
filterable: true,
|
|
92
|
-
params: { useFormatterOuputToFilter: true }
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
id: 'description', name: 'Description', field: 'description', filterable: true, sortable: true, minWidth: 80,
|
|
96
|
-
type: FieldType.string,
|
|
97
|
-
filter: {
|
|
98
|
-
model: new CustomInputFilter(), // create a new instance to make each Filter independent from each other
|
|
99
|
-
enableTrimWhiteSpace: true // or use global "enableFilterTrimWhiteSpace" to trim on all Filters
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
id: 'percentComplete', name: '% Complete', field: 'percentComplete', nameKey: 'PERCENT_COMPLETE', minWidth: 120,
|
|
104
|
-
sortable: true,
|
|
105
|
-
formatter: Formatters.progressBar,
|
|
106
|
-
type: FieldType.number,
|
|
107
|
-
filterable: true,
|
|
108
|
-
filter: {
|
|
109
|
-
model: Filters.sliderRange,
|
|
110
|
-
maxValue: 100, // or you can use the filterOptions as well
|
|
111
|
-
operator: OperatorType.rangeInclusive, // defaults to inclusive
|
|
112
|
-
params: { hideSliderNumbers: false }, // you can hide/show the slider numbers on both side
|
|
113
|
-
filterOptions: { min: 0, step: 5 } as JQueryUiSliderOption // you can also optionally pass any option of the jQuery UI Slider
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
id: 'start', name: 'Start', field: 'start', nameKey: 'START', formatter: Formatters.dateIso, sortable: true, minWidth: 75, width: 100, exportWithFormatter: true,
|
|
118
|
-
type: FieldType.date, filterable: true, filter: { model: Filters.compoundDate }
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
id: 'finish', name: 'Finish', field: 'finish', nameKey: 'FINISH', formatter: Formatters.dateIso, sortable: true, minWidth: 75, width: 120, exportWithFormatter: true,
|
|
122
|
-
type: FieldType.date,
|
|
123
|
-
filterable: true,
|
|
124
|
-
filter: {
|
|
125
|
-
model: Filters.dateRange,
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
id: 'duration', field: 'duration', nameKey: 'DURATION', maxWidth: 90,
|
|
130
|
-
type: FieldType.number,
|
|
131
|
-
sortable: true,
|
|
132
|
-
filterable: true, filter: {
|
|
133
|
-
model: Filters.input,
|
|
134
|
-
operator: OperatorType.rangeExclusive // defaults to inclusive
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
id: 'completed', name: 'Completed', field: 'completed', nameKey: 'COMPLETED', minWidth: 85, maxWidth: 90,
|
|
139
|
-
formatter: Formatters.checkmark,
|
|
140
|
-
exportWithFormatter: true, // you can set this property in the column definition OR in the grid options, column def has priority over grid options
|
|
141
|
-
filterable: true,
|
|
142
|
-
filter: {
|
|
143
|
-
collection: [{ value: '', label: '' }, { value: true, label: 'True' }, { value: false, label: 'False' }],
|
|
144
|
-
model: Filters.singleSelect,
|
|
145
|
-
filterOptions: { autoDropWidth: true } as MultipleSelectOption
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
];
|
|
149
|
-
|
|
150
|
-
const presetLowestDay = moment().add(-2, 'days').format('YYYY-MM-DD');
|
|
151
|
-
const presetHighestDay = moment().add(20, 'days').format('YYYY-MM-DD');
|
|
152
|
-
|
|
153
|
-
this.gridOptions = {
|
|
154
|
-
autoResize: {
|
|
155
|
-
container: '#demo-container',
|
|
156
|
-
rightPadding: 10
|
|
157
|
-
},
|
|
158
|
-
enableExcelCopyBuffer: true,
|
|
159
|
-
enableFiltering: true,
|
|
160
|
-
// enableFilterTrimWhiteSpace: true,
|
|
161
|
-
enableTranslate: true,
|
|
162
|
-
i18n: this.translate,
|
|
163
|
-
|
|
164
|
-
// use columnDef searchTerms OR use presets as shown below
|
|
165
|
-
presets: {
|
|
166
|
-
filters: [
|
|
167
|
-
// you can use the 2 dots separator on all Filters which support ranges
|
|
168
|
-
{ columnId: 'duration', searchTerms: ['4..88'] },
|
|
169
|
-
// { columnId: 'percentComplete', searchTerms: ['5..80'] }, // without operator will default to 'RangeExclusive'
|
|
170
|
-
// { columnId: 'finish', operator: 'RangeInclusive', searchTerms: [`${presetLowestDay}..${presetHighestDay}`] },
|
|
171
|
-
|
|
172
|
-
// or you could also use 2 searchTerms values, instead of using the 2 dots (only works with SliderRange & DateRange Filters)
|
|
173
|
-
// BUT make sure to provide the operator, else the filter service won't know that this is really a range
|
|
174
|
-
{ columnId: 'percentComplete', operator: 'RangeInclusive', searchTerms: [5, 80] }, // same result with searchTerms: ['5..80']
|
|
175
|
-
{ columnId: 'finish', operator: 'RangeInclusive', searchTerms: [presetLowestDay, presetHighestDay] },
|
|
176
|
-
],
|
|
177
|
-
sorters: [
|
|
178
|
-
{ columnId: 'percentComplete', direction: 'DESC' },
|
|
179
|
-
{ columnId: 'duration', direction: 'ASC' },
|
|
180
|
-
],
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
// mock a dataset
|
|
185
|
-
this.dataset = this.mockData(NB_ITEMS);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
189
|
-
this.angularGrid = angularGrid;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
mockData(itemCount: number, startingIndex = 0): any[] {
|
|
193
|
-
// mock a dataset
|
|
194
|
-
const tempDataset = [];
|
|
195
|
-
for (let i = startingIndex; i < (startingIndex + itemCount); i++) {
|
|
196
|
-
const randomDuration = randomBetween(0, 365);
|
|
197
|
-
const randomYear = randomBetween(moment().year(), moment().year() + 1);
|
|
198
|
-
const randomMonth = randomBetween(0, 12);
|
|
199
|
-
const randomDay = randomBetween(10, 28);
|
|
200
|
-
const randomPercent = randomBetween(0, 100);
|
|
201
|
-
|
|
202
|
-
tempDataset.push({
|
|
203
|
-
id: i,
|
|
204
|
-
title: 'Task ' + i,
|
|
205
|
-
description: (i % 5) ? 'desc ' + i : null, // also add some random to test NULL field
|
|
206
|
-
duration: randomDuration,
|
|
207
|
-
percentComplete: randomPercent,
|
|
208
|
-
percentCompleteNumber: randomPercent,
|
|
209
|
-
start: (i % 4) ? null : new Date(randomYear, randomMonth, randomDay), // provide a Date format
|
|
210
|
-
finish: new Date(randomYear, randomMonth, randomDay),
|
|
211
|
-
completed: (randomPercent === 100) ? true : false,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return tempDataset;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
clearFilters() {
|
|
219
|
-
this.selectedPredefinedFilter = { value: '', label: '' };
|
|
220
|
-
this.angularGrid.filterService.clearFilters();
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/** Dispatched event of a Grid State Changed event */
|
|
224
|
-
gridStateChanged(gridState: GridStateChange) {
|
|
225
|
-
console.log('Client sample, Grid State changed:: ', gridState);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/** Save current Filters, Sorters in LocaleStorage or DB */
|
|
229
|
-
saveCurrentGridState() {
|
|
230
|
-
console.log('Client sample, last Grid State:: ', this.angularGrid.gridStateService.getCurrentGridState());
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
refreshMetrics(e: Event, args: any) {
|
|
234
|
-
if (args && args.current >= 0) {
|
|
235
|
-
setTimeout(() => {
|
|
236
|
-
this.metrics = {
|
|
237
|
-
startTime: new Date(),
|
|
238
|
-
itemCount: args && args.current || 0,
|
|
239
|
-
totalItemCount: this.dataset.length || 0
|
|
240
|
-
};
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
setFiltersDynamically() {
|
|
246
|
-
const presetLowestDay = moment().add(-5, 'days').format('YYYY-MM-DD');
|
|
247
|
-
const presetHighestDay = moment().add(25, 'days').format('YYYY-MM-DD');
|
|
248
|
-
|
|
249
|
-
// we can Set Filters Dynamically (or different filters) afterward through the FilterService
|
|
250
|
-
this.angularGrid.filterService.updateFilters([
|
|
251
|
-
{ columnId: 'duration', searchTerms: ['14..78'], operator: 'RangeInclusive' },
|
|
252
|
-
{ columnId: 'percentComplete', operator: 'RangeExclusive', searchTerms: [15, 85] },
|
|
253
|
-
{ columnId: 'finish', operator: 'RangeInclusive', searchTerms: [presetLowestDay, presetHighestDay] },
|
|
254
|
-
]);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
setSortingDynamically() {
|
|
258
|
-
this.angularGrid.sortService.updateSorting([
|
|
259
|
-
// orders matter, whichever is first in array will be the first sorted column
|
|
260
|
-
{ columnId: 'finish', direction: 'DESC' },
|
|
261
|
-
{ columnId: 'percentComplete', direction: 'ASC' },
|
|
262
|
-
]);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
usePredefinedFilter(filterValue: string) {
|
|
266
|
-
let filters: any[] = [];
|
|
267
|
-
const currentYear = moment().year();
|
|
268
|
-
|
|
269
|
-
switch (filterValue) {
|
|
270
|
-
case 'currentYearTasks':
|
|
271
|
-
filters = [
|
|
272
|
-
{ columnId: 'finish', operator: OperatorType.rangeInclusive, searchTerms: [`${currentYear}-01-01`, `${currentYear}-12-31`] },
|
|
273
|
-
{ columnId: 'completed', operator: OperatorType.equal, searchTerms: [true] },
|
|
274
|
-
];
|
|
275
|
-
break;
|
|
276
|
-
case 'nextYearTasks':
|
|
277
|
-
filters = [{ columnId: 'start', operator: '>=', searchTerms: [`${currentYear + 1}-01-01`] }];
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
this.angularGrid.filterService.updateFilters(filters);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
switchLanguage() {
|
|
284
|
-
const nextLanguage = (this.selectedLanguage === 'en') ? 'fr' : 'en';
|
|
285
|
-
this.subscriptions.push(
|
|
286
|
-
this.translate.use(nextLanguage).subscribe(() => {
|
|
287
|
-
this.selectedLanguage = nextLanguage;
|
|
288
|
-
})
|
|
289
|
-
);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
@@ -1,37 +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-remote.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 class="col-md-6" style="margin-bottom: 15px">
|
|
15
|
-
<label>Octopart Catalog Search <small>(type a word then press ENTER)</small></label>
|
|
16
|
-
<input type="text" class="form-control" [value]="search" (change)="searchChanged($event.target.value)">
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div class="alert alert-danger col-md-7" role="alert">
|
|
20
|
-
<strong>Note:</strong>
|
|
21
|
-
this demo no longer displays any results because the WebAPI Key to connect and query the <b>Octopart Component
|
|
22
|
-
Search</b> is no longer valid. However the concept remains valid, which is to use your own Custom DataView
|
|
23
|
-
instead of the default SlickGrid DataView used by this library.
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div class="alert alert-warning col-md-6" role="alert" *ngIf="loading">
|
|
27
|
-
<i class="fa fa-refresh fa-spin fa-lg fa-fw"></i>
|
|
28
|
-
<span>Loading...</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<angular-slickgrid gridId="grid18" [columnDefinitions]="columnDefinitions" [gridOptions]="gridOptions"
|
|
32
|
-
[dataset]="dataset" [customDataView]="customDataView"
|
|
33
|
-
(onAngularGridCreated)="angularGridReady($event.detail)"
|
|
34
|
-
(onViewportChanged)="onViewportChanged($event.detail.eventData, $event.detail.args)"
|
|
35
|
-
(onSort)="onSort($event.detail.eventData, $event.detail.args)">
|
|
36
|
-
</angular-slickgrid>
|
|
37
|
-
</div>
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import 'slickgrid/lib/jquery.jsonp-2.4.min';
|
|
2
|
-
import 'slickgrid/slick.remotemodel'; // SlickGrid Remote Plugin
|
|
3
|
-
|
|
4
|
-
import { Component, OnInit, OnDestroy } from '@angular/core';
|
|
5
|
-
import { AngularGridInstance, Column, Formatter, GridOption } from './../modules/angular-slickgrid';
|
|
6
|
-
|
|
7
|
-
declare const Slick: any;
|
|
8
|
-
|
|
9
|
-
const brandFormatter: Formatter = (_row, _cell, _value, _columnDef, dataContext) => {
|
|
10
|
-
return dataContext && dataContext.brand && dataContext.brand.name || '';
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const mpnFormatter: Formatter = (_row, _cell, _value, _columnDef, dataContext) => {
|
|
14
|
-
let link = '';
|
|
15
|
-
if (dataContext && dataContext.octopart_url && dataContext.mpn) {
|
|
16
|
-
link = `<a href="${dataContext.octopart_url}" target="_blank">${dataContext.mpn}</a>`;
|
|
17
|
-
}
|
|
18
|
-
return link;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
@Component({
|
|
22
|
-
templateUrl: './grid-remote.component.html'
|
|
23
|
-
})
|
|
24
|
-
export class GridRemoteComponent implements OnDestroy, OnInit {
|
|
25
|
-
private _eventHandler: any = new Slick.EventHandler();
|
|
26
|
-
|
|
27
|
-
title = 'Example 18: Octopart Catalog Search - Remote Model Plugin';
|
|
28
|
-
subTitle = `
|
|
29
|
-
This example demonstrates how to use "slick.remotemodel.js" or any Remote implementation through an external Remote Service
|
|
30
|
-
<ul>
|
|
31
|
-
<li>
|
|
32
|
-
Your browser (Chrome) might block access to the Octopart query, if you get "block content" then just unblock it
|
|
33
|
-
or try with different browser like Firefox or Edge
|
|
34
|
-
</li>
|
|
35
|
-
<li>If the demo throws some errors, try again later (there's a limit per day).</li>
|
|
36
|
-
<li>
|
|
37
|
-
Uses <a href="https://github.com/6pac/SlickGrid/blob/master/slick.remotemodel.js" target="_blank">slick.remotemodel.js</a>
|
|
38
|
-
which is hooked up to load search results from Octopart, but can easily be extended
|
|
39
|
-
to support any JSONP-compatible backend that accepts paging parameters.
|
|
40
|
-
</li>
|
|
41
|
-
<li>
|
|
42
|
-
This demo implements a custom DataView, however please note that you are on your own to implement all necessary DataView methods
|
|
43
|
-
for Sorting, Filtering, etc...
|
|
44
|
-
</li>
|
|
45
|
-
<li>
|
|
46
|
-
Soure code for this example is available <a href="https://github.com/ghiscoding/Angular-Slickgrid/blob/master/src/app/examples/grid-remote.component.ts" target="_blank">here</a>
|
|
47
|
-
</li>
|
|
48
|
-
</ul>
|
|
49
|
-
`;
|
|
50
|
-
|
|
51
|
-
angularGrid!: AngularGridInstance;
|
|
52
|
-
columnDefinitions!: Column[];
|
|
53
|
-
customDataView: any;
|
|
54
|
-
gridObj: any;
|
|
55
|
-
gridOptions!: GridOption;
|
|
56
|
-
dataset = [];
|
|
57
|
-
loaderDataView: any;
|
|
58
|
-
loading = false; // spinner when loading data
|
|
59
|
-
search = '';
|
|
60
|
-
|
|
61
|
-
constructor() {
|
|
62
|
-
this.loaderDataView = new Slick.Data.RemoteModel();
|
|
63
|
-
this.customDataView = this.loaderDataView && this.loaderDataView.data;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
67
|
-
this.angularGrid = angularGrid;
|
|
68
|
-
this.gridObj = angularGrid.slickGrid; // grid object
|
|
69
|
-
this.loaderDataView.setSort('score', -1);
|
|
70
|
-
this.gridObj.setSortColumn('score', false);
|
|
71
|
-
|
|
72
|
-
// notify of a change to preload the first page
|
|
73
|
-
this.gridObj.onViewportChanged.notify();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
ngOnDestroy() {
|
|
77
|
-
// unsubscribe all SlickGrid events
|
|
78
|
-
this._eventHandler.unsubscribeAll();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
ngOnInit(): void {
|
|
82
|
-
this.defineGrid();
|
|
83
|
-
this.hookAllLoaderEvents();
|
|
84
|
-
|
|
85
|
-
// set default search
|
|
86
|
-
// this.search = 'switch';
|
|
87
|
-
// this.loaderDataView.setSearch(this.search);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
defineGrid() {
|
|
91
|
-
this.columnDefinitions = [
|
|
92
|
-
{ id: 'mpn', name: 'MPN', field: 'mpn', formatter: mpnFormatter, width: 100, sortable: true },
|
|
93
|
-
{ id: 'brand', name: 'Brand', field: 'brand.name', formatter: brandFormatter, width: 100, sortable: true },
|
|
94
|
-
{ id: 'short_description', name: 'Description', field: 'short_description', width: 520 },
|
|
95
|
-
];
|
|
96
|
-
|
|
97
|
-
this.gridOptions = {
|
|
98
|
-
enableAutoResize: true,
|
|
99
|
-
autoResize: {
|
|
100
|
-
container: '#demo-container',
|
|
101
|
-
rightPadding: 10
|
|
102
|
-
},
|
|
103
|
-
enableCellNavigation: true,
|
|
104
|
-
enableColumnReorder: false,
|
|
105
|
-
enableGridMenu: false,
|
|
106
|
-
multiColumnSort: false
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
hookAllLoaderEvents() {
|
|
111
|
-
if (this._eventHandler && this._eventHandler.subscribe && this.loaderDataView && this.loaderDataView.onDataLoading && this.loaderDataView.onDataLoaded) {
|
|
112
|
-
this._eventHandler.subscribe(this.loaderDataView.onDataLoading, (e: Event, args: any) => {
|
|
113
|
-
this.loading = true;
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
this._eventHandler.subscribe(this.loaderDataView.onDataLoaded, (e: Event, args: any) => {
|
|
117
|
-
if (args && this.gridObj && this.gridObj.invalidateRow && this.gridObj.updateRowCount && this.gridObj.render) {
|
|
118
|
-
for (let i = args.from; i <= args.to; i++) {
|
|
119
|
-
this.gridObj.invalidateRow(i);
|
|
120
|
-
}
|
|
121
|
-
this.gridObj.updateRowCount();
|
|
122
|
-
this.gridObj.render();
|
|
123
|
-
this.loading = false;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
onSort(e: Event, args: any) {
|
|
130
|
-
if (this.gridObj && this.gridObj.getViewport && this.loaderDataView && this.loaderDataView.ensureData && this.loaderDataView.setSort) {
|
|
131
|
-
const vp = this.gridObj.getViewport();
|
|
132
|
-
if (args && args.sortCol && args.sortCol.field) {
|
|
133
|
-
this.loaderDataView.setSort(args.sortCol.field, args.sortAsc ? 1 : -1);
|
|
134
|
-
}
|
|
135
|
-
this.loaderDataView.ensureData(vp.top, vp.bottom);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
onViewportChanged(e: Event, args: any) {
|
|
140
|
-
if (this.gridObj && this.gridObj.getViewport && this.loaderDataView && this.loaderDataView.ensureData) {
|
|
141
|
-
const vp = this.gridObj.getViewport();
|
|
142
|
-
this.loaderDataView.ensureData(vp.top, vp.bottom);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
searchChanged(newValue: string) {
|
|
147
|
-
if (newValue && this.gridObj && this.gridObj.getViewport && this.loaderDataView && this.loaderDataView.ensureData && this.loaderDataView.setSearch) {
|
|
148
|
-
const vp = this.gridObj.getViewport();
|
|
149
|
-
this.loaderDataView.setSearch(newValue);
|
|
150
|
-
this.loaderDataView.ensureData(vp.top, vp.bottom);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
@@ -1,62 +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-resize-by-content.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
|
-
<h4 class="ml-3">Container Width (950px)</h4>
|
|
15
|
-
|
|
16
|
-
<div class="row">
|
|
17
|
-
<div class="ml-2 mb-2 mr-2">
|
|
18
|
-
<div class="btn-group" data-bs-toggle="buttons">
|
|
19
|
-
<label class="btn btn-sm btn-outline-secondary {{isUsingDefaultResize ? 'active' : ''}}"
|
|
20
|
-
data-test="autosize-columns-btn">
|
|
21
|
-
<input type="radio" class="btn-check" name="options"
|
|
22
|
-
[checked]="isUsingDefaultResize"
|
|
23
|
-
(click)="handleDefaultResizeColumns()">
|
|
24
|
-
<i class="fa fa-expand"></i> (default resize) by "autosizeColumns"
|
|
25
|
-
</label>
|
|
26
|
-
<label class="btn btn-sm btn-outline-secondary {{isUsingDefaultResize ? '' : 'active'}}"
|
|
27
|
-
data-test="resize-by-content-btn">
|
|
28
|
-
<input type="radio" class="btn-check" name="options"
|
|
29
|
-
[checked]="!isUsingDefaultResize"
|
|
30
|
-
(click)="handleNewResizeColumns()">
|
|
31
|
-
<i class="fa fa-expand"></i> Resize by Cell Content
|
|
32
|
-
</label>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<div class="mb-2">
|
|
37
|
-
<div class="btn-group btn-group-sm" role="group" aria-label="Basic Editing Commands">
|
|
38
|
-
<button type="button" class="btn btn-outline-secondary" data-test="toggle-readonly-btn"
|
|
39
|
-
(click)="toggleGridEditReadonly()">
|
|
40
|
-
<i class="fa fa-table"></i> Toggle Edit/Readonly Grid
|
|
41
|
-
</button>
|
|
42
|
-
<button type="button" class="btn btn-outline-secondary" data-test="undo-last-edit-btn"
|
|
43
|
-
(click)="undoLastEdit()">
|
|
44
|
-
<i class="fa fa-undo"></i> Undo Last Edit
|
|
45
|
-
</button>
|
|
46
|
-
<button type="button" class="btn btn-outline-secondary" data-test="save-all-btn"
|
|
47
|
-
(click)="saveAll()">
|
|
48
|
-
<i class="fa fa-save"></i> Save All
|
|
49
|
-
</button>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<div id="smaller-container" style="width: 950px">
|
|
55
|
-
<angular-slickgrid gridId="grid31"
|
|
56
|
-
[columnDefinitions]="columnDefinitions"
|
|
57
|
-
[gridOptions]="gridOptions"
|
|
58
|
-
[dataset]="dataset"
|
|
59
|
-
(onAngularGridCreated)="angularGridReady($event.detail)">
|
|
60
|
-
</angular-slickgrid>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
$slick-button-border-color: #ababab !default;
|
|
2
|
-
|
|
3
|
-
.editable-field {
|
|
4
|
-
background-color: rgba(227, 240, 251, 0.569) !important;
|
|
5
|
-
}
|
|
6
|
-
.unsaved-editable-field {
|
|
7
|
-
background-color: #fbfdd1 !important;
|
|
8
|
-
}
|
|
9
|
-
.button-style {
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
background-color: white;
|
|
12
|
-
border: 1px solid #{$slick-button-border-color};
|
|
13
|
-
border-radius: 2px;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
text-align: center;
|
|
16
|
-
&:hover {
|
|
17
|
-
border-color: darken($slick-button-border-color, 10%);
|
|
18
|
-
}
|
|
19
|
-
}
|