raise-common-lib 0.0.207 → 0.0.208

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.
Files changed (51) hide show
  1. package/README.md +57 -57
  2. package/bundles/raise-common-lib.umd.js +72 -3
  3. package/bundles/raise-common-lib.umd.js.map +1 -1
  4. package/bundles/raise-common-lib.umd.min.js +1 -1
  5. package/bundles/raise-common-lib.umd.min.js.map +1 -1
  6. package/esm2015/lib/form/checkbox-group/index.component.js +60 -5
  7. package/esm5/lib/form/checkbox-group/index.component.js +74 -5
  8. package/fesm2015/raise-common-lib.js +58 -3
  9. package/fesm2015/raise-common-lib.js.map +1 -1
  10. package/fesm5/raise-common-lib.js +72 -3
  11. package/fesm5/raise-common-lib.js.map +1 -1
  12. package/lib/form/checkbox-group/index.component.d.ts +5 -0
  13. package/package.json +1 -1
  14. package/raise-common-lib.metadata.json +1 -1
  15. package/src/assets/img/arrow_right.svg +4 -4
  16. package/src/assets/img/calendar-disabled.svg +6 -6
  17. package/src/assets/img/calendar.svg +6 -6
  18. package/src/assets/img/calendar_arrow_left.svg +3 -3
  19. package/src/assets/img/calendar_arrow_right.svg +3 -3
  20. package/src/assets/img/checked-vector.svg +3 -3
  21. package/src/assets/img/dialog-close.svg +4 -4
  22. package/src/assets/img/dialog-grow.svg +6 -6
  23. package/src/assets/img/dialog-shrink.svg +6 -6
  24. package/src/assets/img/plus.svg +4 -4
  25. package/src/assets/img/search.svg +4 -4
  26. package/src/assets/img/shrink-icon.svg +6 -6
  27. package/src/assets/img/time-disabled.svg +4 -4
  28. package/src/assets/img/time.svg +4 -4
  29. package/src/assets/img/toolbar-action-addFolder.svg +17 -17
  30. package/src/assets/img/toolbar-action-calculator.svg +11 -11
  31. package/src/assets/img/toolbar-action-collapse.svg +7 -7
  32. package/src/assets/img/toolbar-action-combine.svg +4 -4
  33. package/src/assets/img/toolbar-action-edit.svg +4 -4
  34. package/src/assets/img/toolbar-action-expand.svg +7 -7
  35. package/src/assets/img/toolbar-action-folderMove.svg +8 -8
  36. package/src/assets/img/toolbar-action-lock.svg +6 -6
  37. package/src/assets/img/toolbar-action-preview.svg +7 -7
  38. package/src/assets/img/toolbar-action-publish.svg +5 -5
  39. package/src/assets/img/toolbar-action-reminders.svg +10 -10
  40. package/src/assets/img/toolbar-action-rename.svg +7 -7
  41. package/src/assets/img/toolbar-action-saveSequence.svg +5 -5
  42. package/src/assets/img/toolbar-action-send-file.svg +5 -5
  43. package/src/assets/img/toolbar-action-settle.svg +7 -7
  44. package/src/assets/img/toolbar-action-share.svg +5 -5
  45. package/src/assets/img/toolbar-action-submitForApproval.svg +4 -4
  46. package/src/assets/img/toolbar-action-sync.svg +4 -4
  47. package/src/assets/img/toolbar-action-template.svg +6 -6
  48. package/src/assets/img/toolbar-action-workflow.svg +9 -9
  49. package/src/assets/style/reset/button.scss +0 -1
  50. package/src/assets/style/reset/checkbox.scss +8 -3
  51. package/src/assets/style/variables.scss +1 -0
package/README.md CHANGED
@@ -1,57 +1,57 @@
1
- # RaiseCommonLib
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
4
-
5
- ## Build
6
-
7
- Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory.
8
-
9
- ## Publishing
10
-
11
- After building your library with `npm run build`, go to the dist folder `cd dist/raise-common-lib` and run `npm publish`.
12
-
13
- ## Usage
14
- - ### Install
15
- ```bash
16
- $ npm install raise-common-lib
17
- ```
18
- - ### Set **angular.json**
19
- ```json
20
- "projects": {
21
- "lpInvestor": {
22
- "projectType": "application",
23
- "architect": {
24
- "build": {
25
- "options": {
26
- ...
27
- "assets": [
28
- ...
29
- {
30
- "glob": "**/*",
31
- "input": "node_modules/raise-common-lib/src/assets/",
32
- "output": "/assets/"
33
- }
34
- ],
35
- "styles": [
36
- ...
37
- "node_modules/raise-common-lib/src/assets/style/styles.scss",
38
- "src/styles.scss",
39
- ],
40
- }
41
- ...
42
- ...
43
- ...
44
- ```
45
-
46
- - ### Import Module
47
- ```tsx
48
- //app.module.ts
49
-
50
- import { RaiseCommonLibModule } from "raise-common-lib";
51
-
52
- @NgModule({
53
- imports: [
54
- ...
55
- RaiseCommonLibModule
56
- ],
57
- ```
1
+ # RaiseCommonLib
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.14.
4
+
5
+ ## Build
6
+
7
+ Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory.
8
+
9
+ ## Publishing
10
+
11
+ After building your library with `npm run build`, go to the dist folder `cd dist/raise-common-lib` and run `npm publish`.
12
+
13
+ ## Usage
14
+ - ### Install
15
+ ```bash
16
+ $ npm install raise-common-lib
17
+ ```
18
+ - ### Set **angular.json**
19
+ ```json
20
+ "projects": {
21
+ "lpInvestor": {
22
+ "projectType": "application",
23
+ "architect": {
24
+ "build": {
25
+ "options": {
26
+ ...
27
+ "assets": [
28
+ ...
29
+ {
30
+ "glob": "**/*",
31
+ "input": "node_modules/raise-common-lib/src/assets/",
32
+ "output": "/assets/"
33
+ }
34
+ ],
35
+ "styles": [
36
+ ...
37
+ "node_modules/raise-common-lib/src/assets/style/styles.scss",
38
+ "src/styles.scss",
39
+ ],
40
+ }
41
+ ...
42
+ ...
43
+ ...
44
+ ```
45
+
46
+ - ### Import Module
47
+ ```tsx
48
+ //app.module.ts
49
+
50
+ import { RaiseCommonLibModule } from "raise-common-lib";
51
+
52
+ @NgModule({
53
+ imports: [
54
+ ...
55
+ RaiseCommonLibModule
56
+ ],
57
+ ```
@@ -22671,6 +22671,7 @@
22671
22671
  this.disabled = false;
22672
22672
  this.error = false;
22673
22673
  this.valueChange = new core.EventEmitter();
22674
+ this.indeterminate = false;
22674
22675
  }
22675
22676
  /**
22676
22677
  * @return {?}
@@ -22679,8 +22680,24 @@
22679
22680
  * @return {?}
22680
22681
  */
22681
22682
  function () {
22682
- console.log('first', this.value);
22683
+ console.log("first", this.value);
22684
+ this.translation = JSON.parse(localStorage.getItem("translation"));
22683
22685
  };
22686
+ Object.defineProperty(CheckboxGroupComponent.prototype, "enabledDataSource", {
22687
+ get: /**
22688
+ * @return {?}
22689
+ */
22690
+ function () {
22691
+ var _this = this;
22692
+ return this.dataSource.filter((/**
22693
+ * @param {?} item
22694
+ * @return {?}
22695
+ */
22696
+ function (item) { return !item[_this.fields.disabled]; })) || [];
22697
+ },
22698
+ enumerable: true,
22699
+ configurable: true
22700
+ });
22684
22701
  /**
22685
22702
  * @param {?} event
22686
22703
  * @param {?} option
@@ -22707,14 +22724,62 @@
22707
22724
  */
22708
22725
  function (val) { return val !== option[_this.fields.value]; }));
22709
22726
  }
22727
+ this.calculateIndeterminate(result);
22710
22728
  this.valueChange.emit(result);
22711
22729
  this.ref.markForCheck();
22712
22730
  };
22731
+ /**
22732
+ * @param {?} event
22733
+ * @return {?}
22734
+ */
22735
+ CheckboxGroupComponent.prototype.onSelectAll = /**
22736
+ * @param {?} event
22737
+ * @return {?}
22738
+ */
22739
+ function (event) {
22740
+ var _this = this;
22741
+ if (event.checked) {
22742
+ this.valueChange.emit(this.dataSource
22743
+ .filter((/**
22744
+ * @param {?} item
22745
+ * @return {?}
22746
+ */
22747
+ function (item) { return !item[_this.fields.disabled]; }))
22748
+ .map((/**
22749
+ * @param {?} item
22750
+ * @return {?}
22751
+ */
22752
+ function (item) { return item[_this.fields.value]; })));
22753
+ }
22754
+ else {
22755
+ this.valueChange.emit([]);
22756
+ }
22757
+ this.ref.markForCheck();
22758
+ };
22759
+ /**
22760
+ * @param {?} result
22761
+ * @return {?}
22762
+ */
22763
+ CheckboxGroupComponent.prototype.calculateIndeterminate = /**
22764
+ * @param {?} result
22765
+ * @return {?}
22766
+ */
22767
+ function (result) {
22768
+ if (result.length === this.enabledDataSource.length) {
22769
+ this.indeterminate = false;
22770
+ }
22771
+ else if (result.length > 0 && result.length < this.enabledDataSource.length) {
22772
+ this.indeterminate = true;
22773
+ }
22774
+ else {
22775
+ this.indeterminate = false;
22776
+ }
22777
+ };
22713
22778
  CheckboxGroupComponent.decorators = [
22714
22779
  { type: core.Component, args: [{
22715
22780
  selector: "rs-checkbox-group",
22716
- template: "<div class=\"checkbox-group\" [ngClass]=\"[orientation, error ? 'error' : '']\">\r\n <div class=\"checkbox-item\" *ngFor=\"let option of dataSource\">\r\n <ejs-checkbox\r\n [name]=\"name\"\r\n [label]=\"option[fields.text]\"\r\n [value]=\"option[fields.value]\"\r\n [disabled]=\"option[fields.disabled] || disabled\"\r\n [checked]=\"value.includes(option[fields.value])\"\r\n (change)=\"onChange($event, option)\"\r\n ></ejs-checkbox>\r\n </div>\r\n</div>\r\n",
22717
- styles: [".checkbox-group{display:flex;padding-left:4px}.checkbox-group.horizontal{flex-direction:row;gap:35px}.checkbox-group.vertical{flex-direction:column;gap:14px}.checkbox-group.error .e-checkbox-wrapper .e-frame{border-color:var(--rs-input-error-border-color)}"]
22781
+ template: "<div class=\"checkbox-group\" [ngClass]=\"[orientation, error ? 'error' : '']\">\r\n <ejs-checkbox\r\n [label]=\"translation.SELECT_ALL ? translation.SELECT_ALL : 'Select All'\"\r\n [indeterminate]=\"indeterminate\"\r\n [checked]=\"value.length === enabledDataSource.length ? true : false\"\r\n (change)=\"onSelectAll($event)\"\r\n ></ejs-checkbox>\r\n <div class=\"checkbox-item\" *ngFor=\"let option of dataSource\">\r\n <ejs-checkbox\r\n [name]=\"name\"\r\n [label]=\"option[fields.text]\"\r\n [value]=\"option[fields.value]\"\r\n [disabled]=\"option[fields.disabled] || disabled\"\r\n [checked]=\"value.includes(option[fields.value])\"\r\n (change)=\"onChange($event, option)\"\r\n ></ejs-checkbox>\r\n </div>\r\n</div>\r\n",
22782
+ styles: [".checkbox-group{display:flex;padding-left:4px}.checkbox-group.horizontal{flex-direction:row;gap:35px}.checkbox-group.vertical{flex-direction:column;gap:4px}.checkbox-group.error .e-checkbox-wrapper .e-frame{border-color:var(--rs-input-error-border-color)}"]
22718
22783
  }] }
22719
22784
  ];
22720
22785
  /** @nocollapse */
@@ -22750,6 +22815,10 @@
22750
22815
  CheckboxGroupComponent.prototype.error;
22751
22816
  /** @type {?} */
22752
22817
  CheckboxGroupComponent.prototype.valueChange;
22818
+ /** @type {?} */
22819
+ CheckboxGroupComponent.prototype.translation;
22820
+ /** @type {?} */
22821
+ CheckboxGroupComponent.prototype.indeterminate;
22753
22822
  /**
22754
22823
  * @type {?}
22755
22824
  * @private