@corp-products/ui-components 3.6.0 → 3.6.1
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/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corp-products/ui-components",
|
|
3
|
-
"version": "3.6.
|
|
4
|
-
"scripts": {
|
|
5
|
-
"storybook": "npx storybook dev -p 6006"
|
|
6
|
-
},
|
|
3
|
+
"version": "3.6.1",
|
|
7
4
|
"author": "shireen Omar",
|
|
8
5
|
"description": "shared UI components across our apps",
|
|
9
6
|
"peerDependencies": {
|
|
10
|
-
"@angular/animations": ">=17.0.0 <21.0.0",
|
|
11
7
|
"@angular/common": ">=17.0.0 <21.0.0",
|
|
12
8
|
"@angular/core": ">=17.0.0 <21.0.0",
|
|
13
|
-
"@
|
|
14
|
-
"primeng": ">=17.0.0 <21.0.0"
|
|
9
|
+
"@angular/animations": ">=17.0.0 <21.0.0",
|
|
10
|
+
"primeng": ">=17.0.0 <21.0.0",
|
|
11
|
+
"@ngx-translate/core": ">=15.0.0 <18.0.0"
|
|
15
12
|
},
|
|
16
13
|
"keywords": [
|
|
17
14
|
"angular",
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
<div class="calender-content
|
|
2
|
-
|
|
1
|
+
<div class="calender-content" #calendarContainer>
|
|
2
|
+
@if(isDatePickerShow) {
|
|
3
|
+
<stc-date-picker-switcher [variant]="'in'" [label]="label" id="dateId" (openCalender)="showCalender($event)"
|
|
3
4
|
[control]="control" [formattedDate]='selectedDate' >
|
|
4
|
-
|
|
5
|
+
</stc-date-picker-switcher>
|
|
6
|
+
}
|
|
5
7
|
|
|
6
8
|
<!-- calender.html -->
|
|
7
|
-
<div [dir]="currentLang() === 'ar' ? 'rtl' : 'ltr'" class="p-2 calendar-wrapper " [@slideDown]="
|
|
9
|
+
<div [dir]="currentLang() === 'ar' ? 'rtl' : 'ltr'" class="p-2 calendar-wrapper " [@slideDown]="isShown ? 'open' : 'closed'" >
|
|
8
10
|
<div class="header-tabs">
|
|
9
11
|
<div class="header-label">{{'calender.calender_type' | translate}}</div>
|
|
10
12
|
<div class="tabs">
|
|
@@ -56,13 +56,14 @@ export class DualCalendarComponent {
|
|
|
56
56
|
@Input() label = '';
|
|
57
57
|
@Input() name = '';
|
|
58
58
|
@Input() withTime = true;
|
|
59
|
+
@Input() isDatePickerShow = true;
|
|
59
60
|
mode: 'gregorian' | 'hijri' = 'gregorian';
|
|
60
61
|
gregorianModel!: NgbDateStruct;
|
|
61
62
|
hijriModel!: NgbDateStruct;
|
|
62
63
|
@Input() currentLang = signal<'ar' | 'en'>('ar');
|
|
63
64
|
@Output() gregorianUTC = new EventEmitter<string>();
|
|
64
65
|
gregorianUTCValue = ''
|
|
65
|
-
|
|
66
|
+
@Input() isShown = false
|
|
66
67
|
@ViewChild('calendarContainer') calendarContainer!: ElementRef;
|
|
67
68
|
hijriCal = new NgbCalendarIslamicUmalqura();
|
|
68
69
|
constructor() {
|
|
@@ -95,7 +96,7 @@ export class DualCalendarComponent {
|
|
|
95
96
|
if (!this.calendarContainer) return;
|
|
96
97
|
const clickedInside = this.calendarContainer.nativeElement.contains(event.target);
|
|
97
98
|
if (!clickedInside) {
|
|
98
|
-
this.
|
|
99
|
+
this.isShown = false;
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
private structToNgbDate(d: NgbDateStruct): NgbDate {
|
|
@@ -118,7 +119,7 @@ export class DualCalendarComponent {
|
|
|
118
119
|
}; // datepicker
|
|
119
120
|
|
|
120
121
|
this.selectedDate = this.formatHijri(this.structToNgbDate(this.hijriModel)); //input
|
|
121
|
-
this.
|
|
122
|
+
this.isShown = false;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
onSelectHijri(date: NgbDateStruct) {
|
|
@@ -135,11 +136,11 @@ export class DualCalendarComponent {
|
|
|
135
136
|
this.gregorianUTCValue = this.withTime ? isoUTC : formatDate(jsDate, DateFormats.DATE_ONLY, 'en');
|
|
136
137
|
this.gregorianUTC.emit(this.gregorianUTCValue);
|
|
137
138
|
this.selectedDate = this.formatHijri(ngbDate);
|
|
138
|
-
this.
|
|
139
|
+
this.isShown = false;
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
showCalender(isOpen: boolean) {
|
|
142
|
-
this.
|
|
143
|
+
this.isShown = isOpen;
|
|
143
144
|
}
|
|
144
145
|
|
|
145
146
|
formatHijri(h: NgbDate): string {
|
package/.storybook/main.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from '@storybook/angular';
|
|
2
|
-
|
|
3
|
-
const config: StorybookConfig = {
|
|
4
|
-
stories: ['../src/**/*.stories.ts'],
|
|
5
|
-
addons: ['@storybook/addon-essentials'],
|
|
6
|
-
framework: {
|
|
7
|
-
name: '@storybook/angular',
|
|
8
|
-
options: {},
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default config;
|
package/debug-storybook.log
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
[14:40:41.151] [INFO] storybook v10.2.1
|
|
2
|
-
[14:40:41.896] [DEBUG] Getting package.json info for D:/stc projects/ui-components/projects/ui-components-lib/package.json...
|
|
3
|
-
[14:40:42.170] [WARN] You are currently using Storybook [1m10.2.1[22m but you have packages which are incompatible with it:
|
|
4
|
-
|
|
5
|
-
- @storybook/addon-essentials@8.6.14 which depends on 8.6.14
|
|
6
|
-
Repo: https://github.com/storybookjs/storybook/tree/next/code/addons/essentials
|
|
7
|
-
|
|
8
|
-
Please consider updating your packages or contacting the maintainers for compatibility details.
|
|
9
|
-
|
|
10
|
-
For more details on compatibility guidance, see:
|
|
11
|
-
https://github.com/storybookjs/storybook/issues/32836
|
|
12
|
-
[14:40:42.185] [ERROR] [38;2;241;97;97mSB_CORE-SERVER_0002 (CriticalPresetLoadError): Storybook failed to load the following preset: @storybook/angular/preset.
|
|
13
|
-
|
|
14
|
-
Please check whether your setup is correct, the Storybook dependencies (and their peer dependencies) are installed correctly and there are no package version clashes.
|
|
15
|
-
|
|
16
|
-
If you believe this is a bug, please open an issue on Github.
|
|
17
|
-
|
|
18
|
-
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@storybook/angular' imported from C:\Users\digi_\AppData\Local\npm-cache\_npx\6fe9a9991b157df1\node_modules\storybook\dist\_node-chunks\chunk-KYZVFZ4V.js
|
|
19
|
-
at packageResolve (node:internal/modules/esm/resolve:873:9)
|
|
20
|
-
at moduleResolve (node:internal/modules/esm/resolve:946:18)
|
|
21
|
-
at defaultResolve (node:internal/modules/esm/resolve:1188:11)
|
|
22
|
-
at nextResolve (node:internal/modules/esm/hooks:864:28)
|
|
23
|
-
at Hooks.resolve (node:internal/modules/esm/hooks:306:30)
|
|
24
|
-
at MessagePort.handleMessage (node:internal/modules/esm/worker:196:24)
|
|
25
|
-
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:831:20)
|
|
26
|
-
at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)
|
|
27
|
-
|
|
28
|
-
More info:
|
|
29
|
-
[39m
|
|
30
|
-
at loadPreset (file:///C:/Users/digi_/AppData/Local/npm-cache/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-R3KAQRS5.js:10081:13)
|
|
31
|
-
at async Promise.all (index 0)
|
|
32
|
-
at async loadPresets (file:///C:/Users/digi_/AppData/Local/npm-cache/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-R3KAQRS5.js:10090:73)
|
|
33
|
-
at async getPresets (file:///C:/Users/digi_/AppData/Local/npm-cache/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-R3KAQRS5.js:10121:23)
|
|
34
|
-
at async buildDevStandalone (file:///C:/Users/digi_/AppData/Local/npm-cache/_npx/6fe9a9991b157df1/node_modules/storybook/dist/core-server/index.js:7532:17)
|
|
35
|
-
at async withTelemetry (file:///C:/Users/digi_/AppData/Local/npm-cache/_npx/6fe9a9991b157df1/node_modules/storybook/dist/_node-chunks/chunk-KNMEGL7N.js:218:12)
|
|
36
|
-
at async dev (file:///C:/Users/digi_/AppData/Local/npm-cache/_npx/6fe9a9991b157df1/node_modules/storybook/dist/bin/core.js:2734:3)
|
|
37
|
-
at async _Command.<anonymous> (file:///C:/Users/digi_/AppData/Local/npm-cache/_npx/6fe9a9991b157df1/node_modules/storybook/dist/bin/core.js:2801:92)
|
|
38
|
-
[14:40:42.195] [WARN] Broken build, fix the error above.
|
|
39
|
-
You may need to refresh the browser.
|
|
40
|
-
[14:40:42.436] [WARN] Failed to load preset: {"name":"D:/stc projects/ui-components/projects/ui-components-lib/node_modules/@storybook/addon-essentials/dist/preset.js"} on level 2
|
|
41
|
-
[14:40:42.437] [ERROR] [38;2;241;97;97mError: Cannot find module 'storybook/internal/common'
|
|
42
|
-
Require stack:
|
|
43
|
-
- .\node_modules\@storybook\addon-essentials\dist\preset.js[39m
|
|
44
|
-
at Module._resolveFilename (node:internal/modules/cjs/loader:1212:15)
|
|
45
|
-
at Module._load (node:internal/modules/cjs/loader:1043:27)
|
|
46
|
-
at Module.require (node:internal/modules/cjs/loader:1298:19)
|
|
47
|
-
at require (node:internal/modules/helpers:182:18)
|
|
48
|
-
at Object.<anonymous> (.\node_modules\@storybook\addon-essentials\dist\preset.js:4:14)
|
|
49
|
-
at Module._compile (node:internal/modules/cjs/loader:1529:14)
|
|
50
|
-
at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
|
|
51
|
-
at Module.load (node:internal/modules/cjs/loader:1275:32)
|
|
52
|
-
at Module._load (node:internal/modules/cjs/loader:1096:12)
|
|
53
|
-
at cjsLoader (node:internal/modules/esm/translators:298:15)
|